home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Periodicals / General / Mac Script / mac-script-94-04.txt < prev    next >
Text File  |  1994-06-09  |  579KB  |  14,012 lines

  1. Subject: April MacScripting Digest
  2. Date: Mon, 02 May 94 17:02:40 -0500
  3. From: Fred Terry <pfterry@lks.csi.com>
  4.  
  5.  
  6. This is the April digest of the MacScripting mailing list.
  7.  
  8. =========================================================================
  9. Date:         Thu, 31 Mar 1994 15:45:33 PDT
  10. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12. From:         "Adam C. Engst" <ace@TIDBITS.COM>
  13. Organization: TidBITS
  14. Subject:      Frontmost memory leak
  15.  
  16. Someone forwarded this to me - I can't vouch for it's accuracy, but
  17. I thought I'd mention it so people could either say it's not true
  18. or be aware of it...
  19.  
  20. cheers ... -Adam
  21.  
  22. # 3.  I have found that when using the FrontMost editor (AppleScript 1.1) or
  23. # running a droplet built using same, that 100k to 400k of system heap is used
  24. # but not released when those appls are quit.  We have tried it on Macs from
  25. # the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
  26. # Someone at SOS-APPl is looking into it, but while on the phone, he quietly
  27. # admitted he is running Sys 7.5!
  28.  
  29. --
  30. Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
  31. Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
  32. =========================================================================
  33. Date:         Fri, 1 Apr 1994 08:21:58 EST
  34. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  35. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  36. From:         "Ronald J. Logsdon" <RJ@SHEBUTE.COM>
  37. Subject:      UNSUBSCRIBE APPLESCRIPT
  38.  
  39. UNSUBSCRIBE APPLESCRIPT rj@shebute.com
  40.  
  41. Ronald J. Logsdon
  42. Shebute'
  43.  
  44. http://Shebute.com/Humans/RJ_Logsdon.HTML
  45. =========================================================================
  46. Date:         Fri, 1 Apr 1994 08:30:54 EST
  47. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  48. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  49. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  50. Subject:      MS: One More Time
  51.  
  52. We've had to unsub attempts to the main list in as many days, so it is time
  53. to send this out again. Please retain this for your records and refer to it
  54. when you need to change your status on the list.
  55.  
  56. For the record, the list name is "MACSCRPT" and should be addressed as such
  57. to "Listserv@dartmouth.edu" rather than to this list or to the request list
  58. (the latter of which should be used when you need to speak to a human
  59. administrator of this list when something goes wrong with the listserv
  60. program itself).
  61.  
  62. The relevent addresses you need to know are as follows:
  63.  
  64. * LISTSERV@dartmouth.edu
  65.     the master controller. Mail is handled by computer
  66.     so you have a limited set of commands you can send it.
  67.     (Sending the HELP command will get you basics on this
  68.     including instructions on how to sign off the list and
  69.     set basic options for yourself like whether you want to
  70.     receive the list in digest format or not)
  71.  
  72. * MacScripting-Request@dartmouth.edu
  73.     Fred Terry and Andy J. Williams, the list administrators.
  74.     We can be contacted when you have a problem with the LISTSERV
  75.     program above or when you have any administrative questions.
  76.  
  77. * MacScripting@dartmouth.edu
  78.     the distribution list. Mail sent here goes to
  79.     all the recipients.
  80.  
  81.  
  82. If you have ANY questions at all please contact us at
  83. MacScripting-Request@dartmouth.edu.
  84.  
  85. -A
  86. =========================================================================
  87. Date:         Fri, 1 Apr 1994 07:49:53 -0600
  88. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  89. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  90. From:         Stewart-CIC-IS <Stewart-CIC-IS%micmac@REDSTONE-EMH2.ARMY.MIL>
  91. Subject:      Re: Hypercard won't save
  92.  
  93. Hi!  I've been lurking for a couple of weeks, and know nothing about
  94. AppleScript.  But I saw a similar message on the HC listserver--so I'm
  95. cross-posting their answer.  (Is that illegal?  ;-)
  96.  
  97. >"Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU> asks:
  98. >As an aside, HCv2.2 SAYS it can build stand-alone applications from system
  99. >7, and all the blurb's in the manual, and I even get SOME of the stuff they
  100. >say when I try to "Save a Copy", but I DON'T get the pop-up list of
  101. >File-Types as the manual states.  I'm using system 7.1 (which I would HOPE
  102. >would be backwardly compatible with system 7????)  Any takers? Or should I
  103. >post this question on the HC listserver?
  104.  
  105. >From yesterday's HC listserver--->
  106. >I have a problem with creating a standalone version of a HyperCard 2.2 stack.
  107. >It has been noted that to do this you need to choose 'Save a Copy' from the
  108. >File menu, and a pop-up menu of File-Type should then enable you to save it is
  109.  
  110. >a StandAlone.
  111. >
  112. >The problem is that when I do this, there is no pop-up menu, just a field
  113. >indicating that it is saving it as File-Type : Stack.
  114. >
  115. >The book says that this requires systems 7.
  116. >I am using system 7.1 on a Centris 660AV. I have also tried this on a LCIII
  117. >and a Quadra 800 with the same result.
  118. >
  119. >Has anyone had a similar problem, or have I missed a simple step somewhere.
  120. >
  121.  
  122. Their answer-->
  123. >Yes, Mike, I had the same problem.  Move the translators to the systems file
  124. >and make sure applescript is in the HC directory.  Then you will get the
  125. proper
  126. >dialog box.  But be prepared: standalone stacks are huge.  Sample: one of my
  127. >stacks went from 24K to 800K.
  128. >Regards, STan Sulkes
  129. >sulkes@ucbeh.san.uc.edu
  130.  
  131. I don't deserve any credit for this answer.  :-)  Good Luck!
  132.  
  133. Marcus
  134. stewart-cic-is@redstone-emh2.army.mil
  135. =========================================================================
  136. Date:         Fri, 1 Apr 1994 08:53:15 -0600
  137. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  138. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  139. From:         K J Fox <kjfox@MKE.AB.COM>
  140. Subject:      Re: Frontmost memory leak
  141.  
  142. ># 3.  I have found that when using the FrontMost editor (AppleScript 1.1) or
  143. ># running a droplet built using same, that 100k to 400k of system heap is used
  144. ># but not released when those appls are quit.  We have tried it on Macs from
  145. ># the orig Mac II to an 840 AV, all running Sys 7.1 with the same results.
  146. ># Someone at SOS-APPl is looking into it, but while on the phone, he quietly
  147. ># admitted he is running Sys 7.5!
  148. >
  149.  
  150. Regarding the memory leak with FrontMost... I've written one application
  151. with it and did some recent checking.  It appears that each successive
  152. launch of the application grabs another 100-300K of memory by the System as
  153. shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  154. see the specific size of my system heap though (any ideas??)  At the start,
  155. my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  156. No other apps were launched.  I guess it's time to reboot!
  157.  
  158. kjf
  159.  
  160. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  161. Kenneth J. Fox
  162. Rockwell Automation - Allen Bradley Co.
  163. Milwaukee, WI (414)382-3287
  164. kjfox@mke.ab.com
  165. =========================================================================
  166. Date:         Fri, 1 Apr 1994 06:57:00 PST
  167. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  168. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  169. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  170. Subject:      Re: Applescript 1.1 upgrade:  Worth it?
  171.  
  172. >Sorry if I you talked about this earlier and I missed it.... I bought the
  173. >AppleScript Developer's Toolkit 1.0 from APDA back in December.  Price was
  174. >$199.  I just called them and they said the upgrade to version 1.1 is $99.
  175. >That seems a bit much for an incremental upgrade!  What are the new
  176. >features in 1.1?  Is it worth it?
  177.  
  178. Well, AS 1.1 is certainly much improved over 1.0.  Its faster, and it seems
  179. more stable.  The other item you get with the upgrade to the Developers Kit
  180. is Frontmost, an AppleScript based interface builder.  All the other
  181. elements of the package (example code and utilities) are pretty much
  182. unchanged.
  183.  
  184. -Mark
  185. =========================================================================
  186. Date:         Fri, 1 Apr 1994 09:03:19 -0600
  187. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  188. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  189. From:         Fred Terry <pfterry@LKS.CSI.COM>
  190. Subject:      Re: Frontmost memory leak
  191. In-Reply-To:  Your message of "Fri, 01 Apr 94 08:53:15 CST"
  192.  
  193. >
  194. >Regarding the memory leak with FrontMost... I've written one application
  195. >with it and did some recent checking.  It appears that each successive
  196. >launch of the application grabs another 100-300K of memory by the System as
  197. >shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  198. >see the specific size of my system heap though (any ideas??)  At the start,
  199. >my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  200. >No other apps were launched.  I guess it's time to reboot!
  201.  
  202. Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
  203. should be able to examine the individual blocks.
  204.  
  205. pf
  206.  
  207.  
  208. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  209. pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
  210. =========================================================================
  211. Date:         Fri, 1 Apr 1994 09:41:44 PST
  212. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  213. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  214. From:         Lawrence Wood <lawrencw@MICROSOFT.COM>
  215. Subject:      Re: Example Excel AppleScripts?
  216.  
  217. Hi,
  218.           There should be excel examples on gaea but I'll have to look
  219. to make sure.  If
  220. not I really dont know where to find any examples.  As for the Excel
  221. SDK (which the
  222. manual refers to) is very AppleEvent oriented, but, AppleEvents and
  223. AppleScript are
  224. VERY closely tied together.  Really the only way I know to learn about
  225. Excel3&4 is to
  226. open the application's dictionary and use what it shows.  Since all you
  227. can really do
  228. is get or set things it's not too bad.  You can also 1. Evaluate
  229. formulas, 2. Execute a
  230. macro command, 3. Execute an entire macro.  Good luck.
  231.  
  232. lw
  233. **********************************************************************
  234. *****************************
  235. #include<stddisclaimer.h>  These are my ramblings and do not represent my
  236. employer, etc.
  237. **********************************************************************
  238. *****************************
  239.  
  240. ----------
  241. From: Stephen Jonke  <netmail!jonke@GSFC.NASA.GOV>
  242. To: Multiple recipients of list MACSCRPT  <MACSCRPT@DARTCMS1.DARTMOUTH.EDU>
  243. Subject: Example Excel AppleScripts?
  244. Date:  29 Mar, 94 5:03PM
  245.  
  246. Does anyone have any examples of AppleScripting Excel that I could look at?
  247. I looked on gaea, but there were no Excel AppleScripts there.  Also, are
  248. there any guides available for AppleScripting Excel?  The document
  249. mentioned in the Excel manual seems to be oriented toward AppleEvents, as
  250. opposed to AppleScript (i.e. low level).
  251.  
  252. Steve
  253.  
  254. ---------------------
  255.  jonke@gsfc.nasa.gov
  256. ---------------------
  257. =========================================================================
  258. Date:         Fri, 1 Apr 1994 15:42:13 -0800
  259. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  260. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  261. From:         Jamie Lawrence <jamiel@SYBASE.COM>
  262. Subject:      scripting MS Excel
  263.  
  264. Does anyone wanna give a poor, frustrated excel-scripting wannabe some
  265. example script they have laying around to send and recieve data using
  266. Excel? I can't seem to find the proper syntax to get anything back and
  267. forth. Through a macro I could make sure the particular data in question
  268. could be selected (even though I want to be able to get more complex data
  269. later), but I can't even use this because the script editor won't accept
  270. the class 'selection-object', which I found in Excel's dictionary. It
  271. thinks I mean selection minus object.
  272.  
  273. Help please?
  274.  
  275. thanks-
  276. jamie
  277. =========================================================================
  278. Date:         Fri, 1 Apr 1994 15:58:51 -0800
  279. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  280. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  281. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  282. Subject:      Re: scripting MS Excel
  283.  
  284. At 15:42 4/1/94 -0800, Jamie Lawrence wrote:
  285. >Does anyone wanna give a poor, frustrated excel-scripting wannabe some
  286. >example script they have laying around to send and recieve data using
  287. >Excel? I can't seem to find the proper syntax to get anything back and
  288. >forth. Through a macro I could make sure the particular data in question
  289. >could be selected (even though I want to be able to get more complex data
  290. >later), but I can't even use this because the script editor won't accept
  291. >the class 'selection-object', which I found in Excel's dictionary. It
  292. >thinks I mean selection minus object.
  293.  
  294.  
  295. tell application "Microsoft Excel"
  296.     set foo to selection
  297.     get value of foo
  298. end tell
  299.  
  300.  
  301. That returns the value of the currently selected cell.  If the current
  302. selection is a range of cells, you get a list, something like this one
  303. (this is burn-before-reading secret data):  {{"191.5"}, {"189.5"},
  304. {"188.5"}, {"189.5"}, {"189"}, {"189.5"}, {"188.5"}, {"189.5"}, {"188.5"}}
  305.  
  306. You can do things like
  307.  
  308. set value of cell 1 of row 6 to -99
  309.  
  310. or, as above
  311. set foo to selection
  312. set value of foo to 120.5
  313.  
  314. [It shouldn't be necessary to have the intermediate variable, but it seems
  315. to be.]
  316.  
  317.    Hope these help.  Keep trying...it really does work
  318.  
  319. --
  320. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  321. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  322. =========================================================================
  323. Date:         Fri, 1 Apr 1994 22:59:22 -0500
  324. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  325. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  326. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  327. Subject:      Acid Jazz
  328.  
  329. Acid Jazz is an Application, but I believe that version 1.1v1 was already
  330. on gaea, it is NOT new. the "Dial Number" script in my "matt's Scripts"
  331. uses Acid Jazz.
  332.  
  333. --
  334. My opinions are mine only and tentative, pending further data
  335.                         Matthew Ahrens
  336. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  337. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  338. =========================================================================
  339. Date:         Sat, 2 Apr 1994 12:22:11 -0500
  340. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  341. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  342. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  343. Subject:      sending raw appleevents
  344.  
  345. OK, I know how to send a raw appleEvent to an application, such
  346. as the finder. my question is this: I have an application that claims
  347. to support AppleEvents, but it isn't appleScriptable. how do i
  348. figure out the AppleEvents that it supports. I looked at it in ResEdit
  349. but didn't find anything obvious.
  350.  
  351. thanx mucho!
  352.  
  353. ps. the app I am trying to do this with is "FilePlayer 2.0" but there are
  354. other apps I would like to send appleEvents to also.
  355.  
  356. --
  357. My opinions are mine only and tentative, pending further data
  358.                         Matthew Ahrens
  359. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  360. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  361. =========================================================================
  362. Date:         Sat, 2 Apr 1994 10:14:11 -0800
  363. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  364. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  365. From:         Mike Cohen <isis@NETCOM.COM>
  366. Subject:      Re: sending raw appleevents
  367. In-Reply-To:  <199404021809.KAA04289@mail.netcom.com> from "Matthew Ahrens" at
  368.               Apr 2, 94 12:22:11 pm
  369.  
  370. >
  371. > OK, I know how to send a raw appleEvent to an application, such
  372. > as the finder. my question is this: I have an application that claims
  373. > to support AppleEvents, but it isn't appleScriptable. how do i
  374. > figure out the AppleEvents that it supports. I looked at it in ResEdit
  375. > but didn't find anything obvious.
  376.  
  377. Get the AEHandler FKEY (it's on the AppleScript & various developer CDs). It
  378. will display all of the current application & system AppleEvent and Coercion
  379. handlers. Unfortunately, some applications just install handlers for an entire
  380. class or even '****', so it won't tell much in that case.
  381.  
  382. --
  383. Mike Cohen           | "Software that means business"
  384. ISIS International   |
  385. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  386. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  387. =========================================================================
  388. Date:         Sat, 2 Apr 1994 10:31:32 -0800
  389. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  390. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  391. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  392. Subject:      Re: sending raw appleevents
  393.  
  394. At 12:22 4/2/94 -0500, Matthew Ahrens wrote:
  395. >OK, I know how to send a raw appleEvent to an application, such
  396. >as the finder. my question is this: I have an application that claims
  397. >to support AppleEvents, but it isn't appleScriptable. how do i
  398. >figure out the AppleEvents that it supports. I looked at it in ResEdit
  399. >but didn't find anything obvious.
  400.  
  401.  
  402. You can't learn everything without the cooperation of the developer of the
  403. application.  [The easiest way to find out is to be told.]
  404.  
  405. Barring that, until recently the Developer CDs had a little FKEY which puts
  406. up a window showing every AE-related handler installed by the front-most
  407. application, and every installed System-level handler.  Warning...this FKEY
  408. crashes when sufficiently-new Finder versions are in front...7.1.3 is
  409. sufficiently new.  This could well be why the FKEY disappeared.
  410.  
  411. [You can, if you are very patient, use the FKEY to lead you to the
  412. handlers, and MacsBug or whatever to disassemble them, so in principle you
  413. can learn everything there is to learn about the application's AE support.
  414. It would be easier to write your own application.  The FKEY can also be
  415. used to remove handlers, and exercise them, although I haven't tried
  416. either.]
  417.  
  418. Note that some applications install a wildcard handler:  class '****', id
  419. '****'.  Any event not dispatched to something more specific goes there.
  420. [Frontier does that, and has a table (system.verbs.traps) into which one
  421. can put a subtable for a class ('misc' is in the as-shipped Frontier).  The
  422. tables contain scripts which are named for the event id (the 'misc' table
  423. ships with 'dosc').  [Meaning one can customize Frontier to accept many
  424. different events.]
  425.  
  426. So just seeing all the posted handlers doesn't necessarily tell you what
  427. events an application handles.  It also doesn't tell you anything about
  428. what the parameters are for non-standard events (or whether the parameters
  429. for standard events are standard).
  430.  
  431.   --JOhn
  432.  
  433. --
  434. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  435. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  436. =========================================================================
  437. Date:         Sat, 2 Apr 1994 19:30:27 -0500
  438. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  439. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  440. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  441. Subject:      coercing file references to anything
  442.  
  443. i can't seem to coerce a file reference to anyhting else. for example,
  444.  
  445. (file "Duo-Gnosis:test") as string
  446. or
  447. (file "Duo-Gnosis:test") as alias
  448. or
  449. alias (file "Duo-Gnosis:test")
  450.  
  451. result in an error: Can't get file "File "Duo-Gnosis:test"
  452.  
  453. I am using AppleScript 1.0, if it matters.
  454.  
  455. --
  456. My opinions are mine only and tentative, pending further data
  457.                         Matthew Ahrens
  458. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  459. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  460. =========================================================================
  461. Date:         Sat, 2 Apr 1994 19:31:15 -0500
  462. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  463. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  464. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  465. Subject:      posting AppleScript Extension
  466.  
  467. would someone with the AppleScript Developer's Kit ver 1.1 be so
  468. kind as to post the applescript extension 1.1 on gaea or info-mac?
  469. I believe that if you read the liscence, you can distribute the
  470. extension to anyone.
  471.  
  472. on a side issue, are there any changes in the Script Editor from ver
  473. 1.0 to 1.1
  474.  
  475. (I have AS 1.0, which I got with TAO of applescript. does anyone know
  476. if they are offoring an upgrade to AS 1.1?)
  477.  
  478. --
  479. My opinions are mine only and tentative, pending further data
  480.                         Matthew Ahrens
  481. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  482. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  483. =========================================================================
  484. Date:         Sat, 2 Apr 1994 20:21:50 EST
  485. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  486. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  487. From:         "William J. Jamison" <jami1@AOL.COM>
  488. Subject:      Re: Frontmost memory leak
  489.  
  490. ">Regarding the memory leak with FrontMost... I've written one application
  491. ">with it and did some recent checking.  It appears that each successive
  492. ">launch of the application grabs another 100-300K of memory by the System as
  493. ">shown in the "About This Macintosh..." box.  I'm not sure of a good way to
  494. ">see the specific size of my system heap though (any ideas??)  At the start,
  495. ">my System was at 4900K and after about 7 launches, it ballooned to 6500K.
  496. ">No other apps were launched.  I guess it's time to reboot!
  497.  
  498. "Wouldn't ZoneRanger work for this. If my memory isn't completely gone, you
  499. "should be able to examine the individual blocks.
  500.  
  501. "pf
  502.  
  503. You could also use NowMenus Memory View
  504.  
  505. Jami1
  506. =========================================================================
  507. Date:         Sat, 2 Apr 1994 21:29:54 -0800
  508. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  509. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  510. From:         Jon Pugh <jonpugh@NETCOM.COM>
  511. Subject:      Re: sending raw appleevents
  512.  
  513. >You can't learn everything without the cooperation of the developer of the
  514. >application.  [The easiest way to find out is to be told.]
  515.  
  516. This is the truth.
  517.  
  518. >Barring that, until recently the Developer CDs had a little FKEY which puts
  519. >up a window showing every AE-related handler installed by the front-most
  520. >application, and every installed System-level handler.  Warning...this FKEY
  521. >crashes when sufficiently-new Finder versions are in front...7.1.3 is
  522. >sufficiently new.  This could well be why the FKEY disappeared.
  523.  
  524. This is not.  :)
  525.  
  526. I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  527. It probably got skipped because Ed didn't remember to resubmit it.  That's
  528. kind of an annoying bother, particularly if you write a lot of stuff, and
  529. Ed Lai has.
  530.  
  531. >[You can, if you are very patient, use the FKEY to lead you to the
  532. >handlers, and MacsBug or whatever to disassemble them, so in principle you
  533. >can learn everything there is to learn about the application's AE support.
  534. >It would be easier to write your own application.  The FKEY can also be
  535. >used to remove handlers, and exercise them, although I haven't tried
  536. >either.]
  537.  
  538. This is probably what made you think it crashed.  This FKEY throws you
  539. rather unceremoniously into Macsbug (and probably TMON too, if I know Ed)
  540. with a disassembly of the handler code that gets that event or coercion.
  541. Nice for setting breakpoints.  I just wish it knew about the osax machanism
  542. and took me to the osax code itself instead of the osax loader code which
  543. handles all the osax events.
  544.  
  545. I've never seen the AEInteraction FKEY crash, and I use it a lot.  You can
  546. find it on the AppleScript CD too.
  547.  
  548. Jon
  549. =========================================================================
  550. Date:         Sun, 3 Apr 1994 08:20:03 -0700
  551. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  552. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  553. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  554. Subject:      Re: sending raw appleevents
  555.  
  556. >>Barring that, until recently the Developer CDs had a little FKEY which puts
  557. >>up a window showing every AE-related handler installed by the front-most
  558. >>application, and every installed System-level handler.  Warning...this FKEY
  559. >>crashes when sufficiently-new Finder versions are in front...7.1.3 is
  560. >>sufficiently new.  This could well be why the FKEY disappeared.
  561. >
  562. >This is not.  :)
  563.  
  564. Yes...last evening I noticed that the FKEY is back on the April Developer CD.
  565.    From one of the CDs where I looked for it, it was notable by its
  566. absence:  listed in the summary part of the documentation of the FKEY
  567. collection, details ripped out of the document, and not in the folder with
  568. the others.  Since I noticed this after the FKEY started crashing for me, I
  569. seem to have made a faulty assumption.
  570.  
  571. >
  572. >I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  573.  
  574. Here, ever since going to Finder 7.1.3, the FKEY crashed immediately upon
  575. being called up with Finder in front.  So I gave up trying.
  576.  
  577. After experiment:  the FKEY is fine on "Zeus", the 8100.  It still crashes
  578. on the IIci (clever name:  "JWB").  Bus error at ... while fetching
  579. instructions from 5C44B854 and 5C44B856 (not surprising that it can't do
  580. that).
  581.  
  582. I guess it's time to reinstall some things on the IIci.
  583.  
  584. Thanks for the correction [again].  --John
  585.  
  586. --
  587. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  588. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  589. =========================================================================
  590. Date:         Mon, 4 Apr 1994 01:21:18 -0500
  591. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  592. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  593. From:         Sean Elfstrom <selfstro@ENGR.TRINITY.EDU>
  594. Subject:      -108 and -1752 errors
  595.  
  596. What causes these errors when I try to run a script from the Finder
  597. using OSAMenu? I have Sys 7.1 and AppleScript 1.0. If I'm in another
  598. app, and try to run the same scripts, it generally works, but since
  599. I'm trying to work with Finder Selections via Jon's Commands, I'd
  600. like for it to work in the Finder as well.
  601.  
  602. --
  603. ---------------------------------------------------------------------
  604. Sean Elfstrom                            | Trinity University
  605. selfstro@cs.trinity.edu                  | 715 Stadium Dr. #707
  606. NeXTMail: selfstro@oberon.cs.trinity.edu | San Antonio, TX 78212-7200
  607. =========================================================================
  608. Date:         Sun, 3 Apr 1994 16:16:36 PDT
  609. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  610. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  611. From:         "Adam C. Engst" <ace@TIDBITS.COM>
  612. Organization: TidBITS
  613. Subject:      FrontMost memory leak
  614.  
  615. The latest word on the FrontMost memory leak...
  616.  
  617. cheers ... -Adam
  618.  
  619. >     I finally heard from Apple (SOS-APPL) after a couple of weeks and a
  620. > little prodding.  This concerned the problem I mentioned about memory losses
  621. > when using the FrontMost portion of AppleScript.
  622. >
  623. >     Apple confirmed the bug that eats up 100k to 400k after each FrontMost
  624. > execution.  They are looking into it, and so don't know if or when they will
  625. > have a solution.  They also don't know how a solution might come  --  in a
  626. > patch or wait for a release.
  627. >
  628. >        Rick Hyman
  629.  
  630. --
  631. Adam C. Engst, TidBITS Editor -- ace@tidbits.com -- info@tidbits.com
  632. Author of The Internet Starter Kit for Macintosh -- tisk@tidbits.com
  633. =========================================================================
  634. Date:         Mon, 4 Apr 1994 09:46:51 -0500
  635. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  636. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  637. From:         Fred Terry <pfterry@LKS.CSI.COM>
  638. Subject:      Re: Example Excel AppleScripts?
  639. In-Reply-To:  Your message of "Fri, 01 Apr 94 09:41:44 PST"
  640.  
  641. >There should be excel examples on gaea but I'll have to look
  642. >to make sure.  If
  643. >not I really dont know where to find any examples.  As for the Excel
  644. >SDK (which the
  645. >manual refers to) is very AppleEvent oriented, but, AppleEvents and
  646. >AppleScript are
  647. >VERY closely tied together.  Really the only way I know to learn about
  648. >Excel3&4 is to
  649. >open the application's dictionary and use what it shows.  Since all you
  650. >can really do
  651. >is get or set things it's not too bad.  You can also 1. Evaluate
  652. >formulas, 2. Execute a
  653. >macro command, 3. Execute an entire macro.  Good luck.
  654.  
  655. I haven't put any out there, but there are some on one of the AppleScript CDs.
  656. I'm trying to find out if I can put them on gaea with the FileMaker ones. If
  657. not, you could always find someone with the CD (think it was the beta one).
  658. You might want to look at
  659.  
  660. ftp://gaea.kgs.ukans.edu/applescript/docs/xldoc.hqx
  661.  
  662. I'll keep you posted on my progress with the examples.
  663.  
  664. pf
  665.  
  666.  
  667. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  668. pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
  669.  
  670. "Bad spellers of the world, untie!"
  671.                                         --Graffito
  672. =========================================================================
  673. Date:         Mon, 4 Apr 1994 08:37:09 -0700
  674. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  675. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  676. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  677. Subject:      Re: -108 and -1752 errors
  678.  
  679. At 01:21 4/4/94 -0500, Sean Elfstrom wrote:
  680. >What causes these errors when I try to run a script from the Finder
  681. >using OSAMenu? I have Sys 7.1 and AppleScript 1.0.
  682.  
  683. Things might go better with AppleScript 1.1, but that's not a full
  684. solution.  Try giving Finder more memory, which isn't easy since Finder
  685. won't do it in the usual way (via the Get Info box).
  686.  
  687. If you only have one startup volume prepared, make a copy of Finder by
  688. dragging its icon to another folder while holding down the option key.
  689. Using ResEdit or one of the others, modify the SIZE -1 resource.  Add
  690. 100,000 or so to the second size box in that resource (shown in decimal
  691. bytes by ResEdit, other editors may differ).  Quit ResEdit or whatever.
  692. Drag the Finder out of the System Folder (to Trash is OK).  Drag your
  693. modified Finder into the System folder.  Restart.
  694.  
  695. If you have two startup volumes available, restart from the other one,
  696. change the Finder on your regular one, and restart from your regular
  697. startup volume.
  698.  
  699.    --John
  700.  
  701. --
  702. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  703. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  704. =========================================================================
  705. Date:         Mon, 4 Apr 1994 09:23:32 -0800
  706. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  707. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  708. From:         Leonard Rosenthol <leonardr@NETCOM.COM>
  709. Subject:      Re: coercing file references to anything
  710.  
  711. >i can't seem to coerce a file reference to anyhting else. for example,
  712. >
  713. >(file "Duo-Gnosis:test") as string
  714. >or
  715. >(file "Duo-Gnosis:test") as alias
  716. >or
  717. >alias (file "Duo-Gnosis:test")
  718. >
  719.         Your problem is that the use of the word "file" is ALSO a coercion
  720. so that you are forcing a double coercion.  Try the following:
  721.  
  722. {alias "HD:Test"}
  723. {file "HD:Test"}
  724. ("HD:Test" as string)
  725.  
  726.  
  727. Leonard
  728.  
  729. -----------------------------------------------------------------------------
  730. Leonard Rosenthol                       Internet:       leonardr@netcom.com
  731. Director of Advanced Technology         AppleLink:      MACgician
  732. Aladdin Systems, Inc.                   GEnie:          MACgician
  733. =========================================================================
  734. Date:         Mon, 4 Apr 1994 09:29:10 -0800
  735. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  736. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  737. From:         Leonard Rosenthol <leonardr@NETCOM.COM>
  738. Subject:      Re: -108 and -1752 errors
  739.  
  740. >What causes these errors when I try to run a script from the Finder
  741. >using OSAMenu? I have Sys 7.1 and AppleScript 1.0.
  742. >
  743.         Well, the -108 is a bug I know about in OSAMenu 1.0 and will be
  744. fixed in 1.0.1, when I get a chance to release it...The -1752 is new to
  745. me...
  746.  
  747. Leonard
  748.  
  749. -----------------------------------------------------------------------------
  750. Leonard Rosenthol                       Internet:       leonardr@netcom.com
  751. Director of Advanced Technology         AppleLink:      MACgician
  752. Aladdin Systems, Inc.                   GEnie:          MACgician
  753. =========================================================================
  754. Date:         Mon, 4 Apr 1994 11:20:12 -0700
  755. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  756. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  757. From:         David Ray <daver@NETCOM.COM>
  758. Subject:      Re: coercing file references to anything
  759.  
  760. >i can't seem to coerce a file reference to anyhting else. for example,
  761. >
  762. >(file "Duo-Gnosis:test") as string
  763. >or
  764. >(file "Duo-Gnosis:test") as alias
  765. >or
  766. >alias (file "Duo-Gnosis:test")
  767.  
  768. This is the same problem I have been running into with the Jons Commands
  769. osax. There is a command called "finder selection" that returns a list
  770. with format like {file "Mac:folder:file"}. The problem is that if I want
  771. to use "finder selection" in a script, I can't coerce the result into a
  772. string. I get an error if I use any of the following:
  773.  
  774. set theFile to item 1 of finder selection
  775. return (theFile as string)              <--- error
  776.  
  777. Jon Pugh who wrote the osax says that he has no problem coercing it into
  778. a string, using Applescript 1.1. I'm using Applescript 1.0. maybe that's
  779. the culprit.
  780.  
  781. -Dave
  782. =========================================================================
  783. Date:         Mon, 4 Apr 1994 13:18:07 -0700
  784. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  785. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  786. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  787. Subject:      Re: sending raw appleevents
  788.  
  789. At 21:29 4/2/94 -0800, Jon Pugh wrote:
  790. [quoting me]
  791. >>Barring that, until recently the Developer CDs had a little FKEY which puts
  792. >>up a window showing every AE-related handler installed by the front-most
  793. >>application, and every installed System-level handler.  Warning...this FKEY
  794. >>crashes when sufficiently-new Finder versions are in front...7.1.3 is
  795. >>sufficiently new.  This could well be why the FKEY disappeared.
  796. >
  797. >This is not.  :)
  798. >
  799. >I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  800. >It probably got skipped because Ed didn't remember to resubmit it.  That's
  801. >kind of an annoying bother, particularly if you write a lot of stuff, and
  802. >Ed Lai has.
  803.  
  804.  
  805. Jon is correct...the AE Interaction FKEY works fine with all the Finders
  806. I've tried it with (through 7.1.4).
  807.  
  808. What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
  809. the "Scriptable Finder").  The crash PC is (per Macsbug as seen on my 8100)
  810. 1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
  811. place to crash]).  Crash seen both with Finder 7.1.3/Finder Scripting
  812. Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
  813. on the 8100.  [Proper install from an Installer floppy on the IIci...drag
  814. install of the extension on the Power Mac.]
  815.  
  816. If it hurts (on your machine), don't do it.
  817.  
  818. The FKEY is wonderfully useful...thanks Ed!
  819.  
  820.   --John
  821.  
  822. --
  823. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  824. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  825. =========================================================================
  826. Date:         Mon, 4 Apr 1994 16:15:37 -0700
  827. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  828. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  829. From:         Richard Kline <kliner@SYNOPSYS.COM>
  830. Subject:      Re: reading the contents of a text file
  831.  
  832. I am running version 1.1 of Applescript with a powermac 8100 and they
  833. appears to be a major bug in Apple script.  I was wondering if anyone else
  834. had seen this.
  835.  
  836. Basicly when ever you compile a script it formats the text so there is only
  837. one work or argument on a line.
  838.  
  839.  
  840. Example
  841.  
  842. Precompiled text looks like this:
  843.  
  844. property textHolder : {""}
  845. property writeLoc : {0}
  846. property searchString : {"STATUS*Profiler Client"}
  847. property sheetname : {""}
  848.  
  849.  
  850. after a check or run the text looks like the following:
  851.  
  852. property
  853. textHolder : {""}
  854. property
  855. writeLoc : {0}
  856. property
  857. searchString : {"STATUS*Profiler Client"}
  858. property
  859. sheetname : {""}
  860.  
  861. This get to be a real problem for if thens and loops
  862.  
  863. precheck
  864.  
  865.         if not (exists Document "mtview.xls") then
  866.                 open alias "New Disk:New Stuff:mtview.xls"
  867.         end if
  868.  
  869. postscheck
  870.  
  871.         if
  872. not
  873. (exists Document "mtview.xls") then
  874.                 open alias "New Disk:New Stuff:mtview.xls"
  875.         end
  876. if
  877.  
  878.  
  879.  
  880. Although the stuff is impossible to read it appears to work.
  881.  
  882.  
  883. Comments or suggestions?
  884.  
  885.  
  886. Thanks
  887.  
  888.  
  889. Rich
  890.  
  891. ----------
  892. Richard Kline
  893. Synopsys, Inc.                             e-mail: kliner@synopsys.com
  894. 700 East Middlefield Road                  phone : (415) 694-4079
  895. Mountain View, CA 94043-4033               fax   : (415) 965-8637
  896. =========================================================================
  897. Date:         Mon, 4 Apr 1994 16:48:43 -0700
  898. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  899. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  900. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  901. Subject:      Re: reading the contents of a text file
  902.  
  903. At 16:15 4/4/94 -0700, Richard Kline wrote:
  904. >I am running version 1.1 of Applescript with a powermac 8100 and they
  905. >appears to be a major bug in Apple script.  I was wondering if anyone else
  906. >had seen this.
  907. >
  908. >Basicly when ever you compile a script it formats the text so there is only
  909. >one work or argument on a line.
  910.  
  911. Not on my 8100, running AppleScript 1.1.  Here's some post-compile output
  912. based on your input:
  913.  
  914. property textHolder : {""}
  915. property writeLoc : {0}
  916. property searchString : {"STATUS*Profiler Client"}
  917. property sheetname : {""}
  918.  
  919. if not (exists document "mtview.xls") then
  920.     --open alias "New Disk:New Stuff:mtview.xls"
  921.     display dialog "foo"
  922. end if
  923.  
  924.  
  925. I have no idea why our results differ.  --John
  926.  
  927. --
  928. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  929. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  930. =========================================================================
  931. Date:         Mon, 4 Apr 1994 18:30:55 U
  932. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  933. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  934. From:         mark stewart <mark_stewart@BIAD23.UTHSCSA.EDU>
  935. Subject:      using Finder Scripting Tool
  936.  
  937.                       using Finder Scripting Toolkit
  938. Okey-dokey,
  939. I'm really frustrated here. Has anyone been using Dan Ranson's Finder Scripting
  940. Toolkit with any success? If so what am I doing wrong? I'm trying the most
  941. basic of the scripts, OpenObjects, and it doesn't work.
  942. I've got AppleScript 1.1, Script Editor 1.1, and 1.0 of the Toolkit.
  943. I'm trying to launch an application in Dan's words "as if [it] were
  944. double-clicked in the Finder." These are my assumptions:
  945. 1. Dan defines an alias in the form "alias "Disk:folder:file"". He says "It
  946. cannot be a pathname or some other way of refering to the object." Okay, so
  947. this means an alias is something I have to first create before I can call it in
  948. a script, correct?
  949. 2. And it really *is* a pathname, simply a pathname to the alias that points to
  950. the object.
  951. 3. The container is an alias to the folder that contains the application you
  952. want to launch. The objs is an alias to the application within the container
  953. folder.
  954.  
  955. Why then would the following *not* do a blessed thing, except compile?
  956.  
  957. on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 alias", #194#
  958.         {"Mark's HD:Apps:Microsoft Excel alias"})
  959. end OpenObjects
  960.  
  961. Here I have made two aliases, one to the folder at "Mark's HD:Apps:Microsoft
  962. Excel 4.0:" (alias path "Mark's HD:Apps:Microsoft Excel 4.0 alias"  and the
  963. other to application at "Mark's HD:Apps:Microsoft Excel 4.0:Microsoft Excel"
  964. (pointed to by "Mark's HD:Apps:Microsoft Excel alias"). I click the Run button
  965. and nada. No complaints from the Editor but no action either. It doesn't seem
  966. to matter where I put the two aliases as long as the paths I give the Editor is
  967. valid.
  968.  
  969. My intention was to use this set of scripts for networking purposes but I
  970. haven't yet tried. Is it more reliable over the wire? That would be strangely
  971. counter-intuitive. Two fellows piped in on my original query--John Pugh and
  972. Matt Ahrens. Might they have any ideas?
  973.  
  974. Mark Stewart
  975. BIAD-Research Imaging Center
  976. UTHSCSA
  977. stewart@uthscsa.edu
  978. =========================================================================
  979. Date:         Mon, 4 Apr 1994 21:04:17 -0400
  980. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  981. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  982. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  983. Subject:      your mail
  984.  
  985. If you have emailed me rescently, or have posted in regard to a topic I
  986. have started, could you please resend your message?
  987.  
  988. I was having some problems with my mailer and your mail may have been lost.
  989.  
  990. thanx a lot, and sorry for the bandwith!
  991.  
  992. --
  993. My opinions are mine only and tentative, pending further data
  994.                         Matthew Ahrens
  995. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  996. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  997. =========================================================================
  998. Date:         Mon, 4 Apr 1994 20:05:56 -0600
  999. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1000. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1001. From:         Brian Gaines <gaines@FSC.CPSC.UCALGARY.CA>
  1002. Subject:      Re: using Finder Scripting Tool
  1003.  
  1004. In message <199404050041.SAA07033@fsa.cpsc.ucalgary.ca> Macintosh Scripting
  1005. Systems writes:
  1006. >                       using Finder Scripting Toolkit
  1007. > Okey-dokey,
  1008. > I'm really frustrated here. Has anyone been using Dan Ranson's Finder
  1009. > Scripting
  1010. > Toolkit with any success? If so what am I doing wrong? I'm trying the most
  1011.  
  1012. Mark your posted material seems to have got a bit corrupted and I couldn't
  1013. see what was going on. However, I can confirm that the finder events do
  1014. work as specified. They don't seem to do any coercion so you have to have
  1015. exactly the structure specified, ie an alias to the folder and a list of
  1016. aliases to files.
  1017.  
  1018. One thing you CAN get away with that helps a lot is that the alias to the
  1019. folder can be an alias to a file within the folder. This means, for example,
  1020. that if you are just opening one file you can use the same alias in both
  1021. positions.
  1022.  
  1023. I've been using the finder calls successfully in scripts within my application
  1024. both on the local machine and across the net. They are very neat compared
  1025. with loading the whole of finderlib.
  1026.  
  1027. b.
  1028.  
  1029.  
  1030. Brian Gaines              Knowledge Science Institute, University of Calgary
  1031. gaines@cpsc.ucalgary.ca   Calgary, Alberta, Canada T2N 1N4
  1032. =========================================================================
  1033. Date:         Tue, 5 Apr 1994 11:54:30 +0930
  1034. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1035. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1036. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  1037. Subject:      Thanks!
  1038.  
  1039. To all of you out there who responded to my problems regarding
  1040. Applescripting FileMakerPro from Hypercard2.2 - Thanks.
  1041.  
  1042. I now have HC2.2 producing stand-alone applications (apparently I hadn't
  1043. transferred the StackToApp extension to my extensions folder (pity the HC
  1044. installation doesn't do this for you).
  1045.  
  1046. I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
  1047. still trying.  I can do it from HC, but its certainly not "pretty".
  1048.  
  1049. So, thanks again!
  1050.  
  1051. Paul J. Stoll
  1052. Computer Assisted Learning Unit
  1053. Flinders University of South Australia
  1054. Flinders Medical Centre
  1055. Bedford Park.  5042.
  1056. South Australia.
  1057. =========================================================================
  1058. Date:         Mon, 4 Apr 1994 23:22:21 -0700
  1059. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1060. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1061. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  1062. Subject:      Re: Thanks!
  1063.  
  1064. At 11:54 4/5/94 +0930, Paul J. Stoll wrote:
  1065. >I still can't by-pass the FileMakerPrto "open file" dialog box but I'm
  1066. >still trying.  I can do it from HC, but its certainly not "pretty".
  1067.  
  1068. That can be done from a UserTalk (Frontier) script, but you also (under
  1069. Frontier) need to bring FileMaker to the front before the open message.
  1070.  
  1071.    --John
  1072.  
  1073. --
  1074. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  1075. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  1076. =========================================================================
  1077. Date:         Tue, 5 Apr 1994 20:34:59 CST
  1078. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1079. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1080. From:         Jiaw-yih Hwang <joy1@MAIL.NCKU.EDU.TW>
  1081. Subject:      Scriptible Communication Software:?
  1082.  
  1083. Hi! Netter:
  1084. Is there any coummunication software which could eastablish a SLIP conection 
  1085. and
  1086. could be scripted.
  1087.  
  1088. ====================================================================
  1089.         /=====|     Jiaw-yih Hwang
  1090.        /      |     Department of Interior Design,
  1091.       /       |     Tainan Junior College of Home Economics, Taiwan
  1092.     ============    ------------------------------
  1093.      []-[]----}     joy1@mail.ncku.edu.tw
  1094.       /_            ------------------------------
  1095.        ==           "Less is More."
  1096.        [_           "These are rumors. I reserve the right to be wrong."-Murph
  1097. ====================================================================
  1098. =========================================================================
  1099. Date:         Tue, 5 Apr 1994 09:13:44 -0400
  1100. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1101. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1102. From:         John Schettino <js12@GTE.COM>
  1103. Subject:      Re: reading the contents of a text file
  1104.  
  1105. >I am running version 1.1 of Applescript with a powermac 8100 and they
  1106. >appears to be a major bug in Apple script.  I was wondering if anyone else
  1107. >had seen this.
  1108. >
  1109. >Although the stuff is impossible to read it appears to work.
  1110. >
  1111. >
  1112. >Comments or suggestions?
  1113.  
  1114. I'd re-install AS 1.1 - this is not normal. Your dialect file may be
  1115. trashed. You can also try going into the script editor's edit,applescript
  1116. formatting..., and choose defaults to see if that clears it up.
  1117.  
  1118.  
  1119. - john
  1120.  
  1121. -----------------------------------------
  1122. js12@gte.com                      GTE Laboratories
  1123. John Schettino                           Waltham, MA
  1124. =========================================================================
  1125. Date:         Tue, 5 Apr 1994 08:41:28 -0500
  1126. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1127. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1128. From:         Fred Terry <pfterry@LKS.CSI.COM>
  1129. Subject:      Re: Scriptible Communication Software:?
  1130. In-Reply-To:  Your message of "Tue, 05 Apr 94 20:34:59 CST"
  1131.  
  1132. >Hi! Netter:
  1133. >Is there any coummunication software which could eastablish a SLIP conection a
  1134. >nd
  1135. >could be scripted.
  1136. >
  1137.  
  1138. Pick up a copy of InterSlip AE. You'll find it at
  1139. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/InterSLIP_AE_1.0b1.sit.hqx
  1140.  
  1141. Cheers.
  1142.  
  1143. pf
  1144.  
  1145.  
  1146. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1147. pf = Fred Terry, The Summit Group, pfterry@lks.csi.com, +1 913/841-1283
  1148. =========================================================================
  1149. Date:         Tue, 5 Apr 1994 11:14:21 -0400
  1150. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1151. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1152. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  1153. Subject:      Where is drag manager?
  1154.  
  1155. I guess the subject says it all. where can I find the drag Manager,
  1156. if it is available yet.
  1157.  
  1158. tia!
  1159.  
  1160. --
  1161. My opinions are mine only and tentative, pending further data
  1162.                         Matthew Ahrens
  1163. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  1164. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  1165. =========================================================================
  1166. Date:         Tue, 5 Apr 1994 11:46:34 -0400
  1167. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1168. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1169. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  1170. Subject:      Re: coercing file references to anything
  1171.  
  1172. Leonard Rosenthol <leonardr@NETCOM.COM> mentioned that i
  1173. am trying to do a double coercion. i am not. i am
  1174. trying to do anything useful with the "Finder Selection" command in
  1175. "Jon's Commands". David Ray <daver@NETCOM.COM>
  1176.  mentioned that he also has the same
  1177. problem in AS 1.0. i also have version 1.0. I have asked before, and
  1178. now I am PLEADING. PLEASE SEND ME APPLESCRIPT 1.1! This IS LEGAL.
  1179. All that I want is the Extension. if you will read your liscence, it
  1180. says that you can distribute the extension & osaxen to anyone you like.
  1181.  
  1182. thanx very much!
  1183.  
  1184. --
  1185. My opinions are mine only and tentative, pending further data
  1186.                         Matthew Ahrens
  1187. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  1188. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  1189. =========================================================================
  1190. Date:         Tue, 5 Apr 1994 11:47:18 -0400
  1191. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1192. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1193. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  1194. Subject:      Re: sending raw appleevents
  1195.  
  1196. Thanx to everyone for their help with this question. you have mentioned
  1197. that I can use the AEInteraction FKEY. Unfortunately I don't get the
  1198. developers' CD. could someone tell me where to get this FKEY (FTP
  1199. preferred), or email it to me, or give me the address of the author?
  1200.  
  1201. thanx a lot!
  1202.  
  1203. --
  1204. My opinions are mine only and tentative, pending further data
  1205.                         Matthew Ahrens
  1206. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  1207. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  1208. =========================================================================
  1209. Date:         Tue, 5 Apr 1994 10:19:52 -0500
  1210. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1211. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1212. From:         Jay Martin <jay_martin@POSTOFFICE.AIDT.EDU>
  1213. Subject:      Re> Where is drag manager?
  1214.  
  1215. >I guess the subject says it all. where can I find the drag Manager,
  1216. >if it is available yet.
  1217.  
  1218. The drag manager must be bought as part of the dev. kit from APDA (it's
  1219. called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1220. 800-282-2732). Supposedly, it's distributed with applications that are
  1221. drag-aware, but I don't know of any shipping yet. It's not currently
  1222. distributed with the system software (maybe 7.5?).
  1223.  
  1224. Jay
  1225. +---------------------------------------+----------------------------------+
  1226. | --------------+ Jay M. Martin         | All ideas here are my own and    |
  1227. |   +---------- | Alabama Industrial    | in no way reflect my employer's. |
  1228. |   | ----------+ Development Training  |                  martin@aidt.edu |
  1229. |   +---------------------------------- |                                  |
  1230. +---------------------------------------+----------------------------------+
  1231. =========================================================================
  1232. Date:         Tue, 5 Apr 1994 15:00:42 -0400
  1233. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1234. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1235. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  1236. Subject:      Re: Re> Where is drag manager?
  1237. In-Reply-To:  <no.id> from "Jay Martin" at Apr 5, 94 10:19:52 am
  1238.  
  1239. --Jay Martin wrote:
  1240. >
  1241. >
  1242. >The drag manager must be bought as part of the dev. kit from APDA (it's
  1243. >called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1244. >800-282-2732).
  1245.  
  1246.     It was also included on the latest Develop magazine CD.
  1247.  
  1248. >Supposedly, it's distributed with applications that are drag-aware, but
  1249. >I don't know of any shipping yet.
  1250.  
  1251.     This is because Apple hasn't given the official go ahead for the
  1252. lisencing of the MDD extension. This will probably happen in about a
  1253. month or so.
  1254.  
  1255. >It's not currently distributed with the system software (maybe 7.5?).
  1256.  
  1257.     Correct. The Drag Manager will be an official part of 7.5. As will
  1258. QuickDraw GX, and posibly QuickTime 2.0 if tey can finish it in time.
  1259.  
  1260. -Hades
  1261. =========================================================================
  1262. Date:         Tue, 5 Apr 1994 12:02:04 -0700
  1263. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1264. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1265. From:         Jon Pugh <jonpugh@NETCOM.COM>
  1266. Subject:      Re: A bunch of stuff
  1267.  
  1268. Please pardon my lack of attributions.  Various people said various things.
  1269. You know who you are.
  1270.  
  1271. >If you only have one startup volume prepared, make a copy of Finder by
  1272. >dragging its icon to another folder while holding down the option key.
  1273. >Using ResEdit or one of the others, modify the SIZE -1 resource.  Add
  1274. >100,000 or so to the second size box in that resource (shown in decimal
  1275. >bytes by ResEdit, other editors may differ).  Quit ResEdit or whatever.
  1276. >Drag the Finder out of the System Folder (to Trash is OK).  Drag your
  1277. >modified Finder into the System folder.  Restart.
  1278.  
  1279. Just an optimization:  drag the Finder (or any other busy file) out of the
  1280. system folder to the desktop.  Option-drag it back and edit that one.
  1281. Restart.  It's just a bit less dragging around and you have the old one
  1282. lying on the desktop if you need it after you screw up.  ;)
  1283.  
  1284. >>i can't seem to coerce a file reference to anyhting else. for example,
  1285. >>
  1286. >>(file "Duo-Gnosis:test") as string
  1287. >>or
  1288. >>(file "Duo-Gnosis:test") as alias
  1289. >>or
  1290. >>alias (file "Duo-Gnosis:test")
  1291. >
  1292. >This is the same problem I have been running into with the Jons Commands
  1293. >osax. There is a command called "finder selection" that returns a list
  1294. >with format like {file "Mac:folder:file"}. The problem is that if I want
  1295. >to use "finder selection" in a script, I can't coerce the result into a
  1296. >string. I get an error if I use any of the following:
  1297. >
  1298. >set theFile to item 1 of finder selection
  1299. >return (theFile as string)              <--- error
  1300. >
  1301. >Jon Pugh who wrote the osax says that he has no problem coercing it into
  1302. >a string, using Applescript 1.1. I'm using Applescript 1.0. maybe that's
  1303. >the culprit.
  1304.  
  1305. I just checked with a friend at Apple and he confirms that the file object
  1306. specifier to string coercion was added in Applescript 1.1.  I might add an
  1307. fss to string coercion to the next version of Jon's Commands.
  1308.  
  1309. >>I just flipped up that AEInteraction FKEY in my 7.1.3 and it works fine.
  1310. >>It probably got skipped because Ed didn't remember to resubmit it.  That's
  1311. >>kind of an annoying bother, particularly if you write a lot of stuff, and
  1312. >>Ed Lai has.
  1313. >
  1314. >
  1315. >Jon is correct...the AE Interaction FKEY works fine with all the Finders
  1316. >I've tried it with (through 7.1.4).
  1317. >
  1318. >What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
  1319. >the "Scriptable Finder").  The crash PC is (per Macsbug as seen on my 8100)
  1320. >1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
  1321. >place to crash]).  Crash seen both with Finder 7.1.3/Finder Scripting
  1322. >Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
  1323. >on the 8100.  [Proper install from an Installer floppy on the IIci...drag
  1324. >install of the extension on the Power Mac.]
  1325.  
  1326. Hmmm, my Finder is the scriptable one and it works fine for me.  Perhaps
  1327. it's a memory related problem.  I have upped my SIZE resource as described
  1328. previously.
  1329.  
  1330. >If it hurts (on your machine), don't do it.
  1331.  
  1332. Always good advice.
  1333.  
  1334. >on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 alias", #194#
  1335. >        {"Mark's HD:Apps:Microsoft Excel alias"})
  1336. >end OpenObjects
  1337. >
  1338. >Here I have made two aliases, one to the folder at "Mark's HD:Apps:Microsoft
  1339. >Excel 4.0:" (alias path "Mark's HD:Apps:Microsoft Excel 4.0 alias"  and the
  1340. >other to application at "Mark's HD:Apps:Microsoft Excel 4.0:Microsoft Excel"
  1341. >(pointed to by "Mark's HD:Apps:Microsoft Excel alias"). I click the Run button
  1342. >and nada. No complaints from the Editor but no action either. It doesn't seem
  1343. >to matter where I put the two aliases as long as the paths I give the Editor 
  1344. is
  1345. >valid.
  1346. >
  1347. >My intention was to use this set of scripts for networking purposes but I
  1348. >haven't yet tried. Is it more reliable over the wire? That would be strangely
  1349. >counter-intuitive. Two fellows piped in on my original query--John Pugh and
  1350. >Matt Ahrens. Might they have any ideas?
  1351.  
  1352. Maybe they would...
  1353.  
  1354. I've been burned by minimal aliases before.  Folder aliases must end in a
  1355. colon.  Yours does not.  You might also need to skip the aliases to
  1356. aliases.  Try:
  1357.  
  1358. on OpenObjects(alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:", --
  1359.         {alias "Mark's HD:Apps:Microsoft Excel 4.0 folder:Excel"})
  1360. end OpenObjects
  1361.  
  1362. Jon
  1363. =========================================================================
  1364. Date:         Tue, 5 Apr 1994 15:12:18 -0400
  1365. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1366. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1367. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  1368. Subject:      Re: Re> Where is drag manager?
  1369.  
  1370. Is the drag manager part of System 7 Pro?  Are you talking about the drag
  1371. and drop features of Apple Mail, or something else?
  1372.  
  1373. Steve
  1374.  
  1375. ---------------------
  1376.  jonke@gsfc.nasa.gov
  1377. ---------------------
  1378. =========================================================================
  1379. Date:         Tue, 5 Apr 1994 13:37:43 -0500
  1380. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1381. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1382. From:         Jay Martin <jay_martin@POSTOFFICE.AIDT.EDU>
  1383. Subject:      Re> Where is drag manager?
  1384.  
  1385. >>The drag manager must be bought as part of the dev. kit from APDA (it's
  1386. >>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1387. >>800-282-2732).
  1388. >>
  1389. >It was also included on the latest Develop magazine CD.
  1390. >
  1391. Really? I've only seen the DocViewer interface notes on any of the CD's (both
  1392. the Develop CD and the Developer's mailing CD's), not the actual software. I
  1393. guess I'd better look closer!
  1394.  
  1395. Jay
  1396. +---------------------------------------+----------------------------------+
  1397. | --------------+ Jay M. Martin         | All ideas here are my own and    |
  1398. |   +---------- | Alabama Industrial    | in no way reflect my employer's. |
  1399. |   | ----------+ Development Training  |                  martin@aidt.edu |
  1400. |   +---------------------------------- |                                  |
  1401. +---------------------------------------+----------------------------------+
  1402. =========================================================================
  1403. Date:         Tue, 5 Apr 1994 16:43:28 -0400
  1404. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1405. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1406. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  1407. Subject:      Re: Where is drag manager?
  1408.  
  1409. At 10:19 AM 4/5/94 -0500, Jay Martin wrote:
  1410. >>I guess the subject says it all. where can I find the drag Manager,
  1411. >>if it is available yet.
  1412. >
  1413. >The drag manager must be bought as part of the dev. kit from APDA (it's
  1414. >called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1415. >800-282-2732). Supposedly, it's distributed with applications that are
  1416. >drag-aware, but I don't know of any shipping yet. It's not currently
  1417. >distributed with the system software (maybe 7.5?).
  1418.  
  1419. I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
  1420. mailer and the finder seem to exhibit the same behavior that is mentioned
  1421. in December's _Develop_).
  1422.  
  1423. Bob
  1424.  
  1425. --
  1426. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  1427. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  1428.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  1429. =========================================================================
  1430. Date:         Tue, 5 Apr 1994 16:56:14 -0400
  1431. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1432. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1433. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  1434. Subject:      Re: Where is drag manager?
  1435. In-Reply-To:  <no.id> from "Bob Snyder" at Apr 5, 94 04:43:28 pm
  1436.  
  1437. --Bob Snyder wrote:
  1438. >
  1439. >I think the Drag Manager is part of System 7 Pro (or at least the Powertalk
  1440. >mailer and the finder seem to exhibit the same behavior that is mentioned
  1441. >in December's _Develop_).
  1442.  
  1443.     There is limited Drag Manager support for the PowerTalk system of
  1444. System 7 Pro. It is not the full Macintosh Drag and Drop Extension, and
  1445. will not work with anything other than the Finder, AppleMail, and the
  1446. PowerTalk utilities.
  1447.  
  1448. -Hades
  1449. =========================================================================
  1450. Date:         Tue, 5 Apr 1994 17:49:13 -0400
  1451. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1452. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1453. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  1454. Subject:      Scriptable non-AOCE version of QuickMail??
  1455.  
  1456. Subject says it all - does CE Software have a non-AOCE version of QuickMail
  1457. that supports AppleScript?
  1458.  
  1459. Steve
  1460.  
  1461. ---------------------
  1462.  jonke@gsfc.nasa.gov
  1463. ---------------------
  1464. =========================================================================
  1465. Date:         Tue, 5 Apr 1994 14:57:28 PDT
  1466. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1467. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1468. From:         Brian Feinberg <brian@IIT.COM>
  1469. Subject:      MacPPP control source
  1470.  
  1471.     Would it be possible for the author of the MacPPP control OSAX
  1472. to post the source on gaea? I'm another person who's seen the problem
  1473. running it from Frontier, and I'd like to take a look at it, maybe make it
  1474. a UCMD.
  1475.  
  1476. --- Brian
  1477. =========================================================================
  1478. Date:         Tue, 5 Apr 1994 20:02:47 -0400
  1479. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1480. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1481. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  1482. Subject:      Eudora Notify troubles...
  1483.  
  1484. Hi everybody,
  1485.  
  1486.         I've been haveing alot of trouble working with the message list
  1487. returned by Eudora 2.0.2 with a Notify event.  Here's essentially what I've
  1488. been working with:
  1489.  
  1490. --System 7.1 with AppleScript 1.1
  1491.  
  1492. --getting Eudora to notify this applet is no problem, so I omitted it.
  1493.  
  1494. on =ABevent CSOmeNot=BB messageList
  1495.   tell application "Eudora 2.0.2"
  1496.     repeat with thisMessage in messageList
  1497.       try
  1498.         set whofrom to (get Sender of thisMessage)
  1499.       on error errMsg number errNum
  1500.         display dialog errMsg
  1501.       end try
  1502.       display dialog whofrom
  1503.     end repeat
  1504.   end tell
  1505. end =ABevent CSOmeNot=BB
  1506.  
  1507.  
  1508. Ok, here's what's going wrong:  The script compiles fine, but during
  1509. execution it seems to choke on the "set whofrom to (get Sender of
  1510. thisMessage)" line.  The error I get back follows:
  1511.  
  1512. Can't get Sender of message 178 of mailbox "In" of mail folder "".
  1513.  
  1514. The error number is -1728.
  1515.  
  1516. If I just make a new script like this:
  1517.  
  1518. tell application "Eudora 2.0.2"
  1519.   get Sender of message 178 of mailbox "In" of mail folder ""
  1520. end tell
  1521.  
  1522. It works fine.  So, am I missing some kind of coercion here, or what?  I've
  1523. tried coercing thisMessage to reference and text, but niether one works.
  1524. Any ideas?  It's driving me crazy!
  1525.  
  1526.                 Thanks,
  1527.                    Sam
  1528. =========================================================================
  1529. Date:         Tue, 5 Apr 1994 20:49:00 -0500
  1530. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1531. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1532. From:         Headless Pumpkin <sdouglas@HARTFORD.EDU>
  1533. Subject:      Re: Re> Where is drag manager?
  1534.  
  1535. >>>The drag manager must be bought as part of the dev. kit from APDA (it's
  1536. >>>called the Macintosh Drag and Drop Developers Kit - R0552LL/A - $75 -
  1537. >>>800-282-2732).
  1538. >>>
  1539. >>It was also included on the latest Develop magazine CD.
  1540. >>
  1541. >Really? I've only seen the DocViewer interface notes on any of the CD's (both
  1542. >the Develop CD and the Developer's mailing CD's), not the actual software. I
  1543. >guess I'd better look closer!
  1544. >
  1545. >Jay
  1546.  
  1547. I didn't find the DragManager on the Develop Bookmark CD either.
  1548.  
  1549. I would recommend however that any graphic artists out there check out
  1550. Pixel Paint Pro 3.0. It is applescriptable, recordable, and comes with
  1551. AppleScript 1.1 and the DragManager!
  1552.  
  1553. This program is wonderful. Oh, and it uses Photoshop plug-ins for good
  1554. measure (Kai's PowerTools!!).
  1555.  
  1556. Cheers,
  1557.  
  1558. -------------------------------------------------------------------------
  1559. Scott Douglass                  *My joys, my griefs, my passions, and   *
  1560. ->sdouglas@hartford.edu<-       *       my powers,                      *
  1561. dithyramb@pan.com               *Made me a stranger.               Byron*
  1562. scott@pumpkin.uucp              http://www.hartford.edu/UofHWelcome.html
  1563. finger me for my public key!    MIME spoken here!
  1564. =========================================================================
  1565. Date:         Tue, 5 Apr 1994 22:58:18 -0500
  1566. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1567. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1568. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1569. Subject:      Eudora Script (save & close)
  1570.  
  1571. Here is a script I'm trying to get to work:
  1572.  
  1573. tell application "Eudora1.4.2"
  1574.         activate
  1575.         make inserthere end of mailbox "Out" of mail folder "" objectclass
  1576. message
  1577.         copy (the clipboard) to field named "" of message named ""
  1578.         copy "Info-Mac" to field named "Subject:" of message named ""
  1579.         save
  1580.         close
  1581. end tell
  1582.  
  1583. The trouble is with the "save" and "close" part.  How can I get Eudora to
  1584. save the message (not queue it) and close the window?
  1585.  
  1586. The Eudora dictionary says:
  1587.         close  reference
  1588.         save  reference  -- the object to save
  1589.  
  1590. I can't figure out what to put in the "reference" part.
  1591.  
  1592. Thanks in advance,
  1593. Chris
  1594. =========================================================================
  1595. Date:         Tue, 5 Apr 1994 22:58:30 -0500
  1596. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1597. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1598. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1599. Subject:      "save/read data" osax
  1600.  
  1601. (gaea.kgs.ukans.edu:applescript/osaxen/savereaddata1.1.cpt.hqx)
  1602.  
  1603. I've been trying to use the "save/read data" osax I found on gaea, but I've
  1604. run into a problem with the syntax on the "save data" part.
  1605.  
  1606. Here is the dictionary:
  1607.  
  1608.    save data: Stores data object in file specified.
  1609.         save data  data  -- data or variable object to store
  1610.                 in  alias  -- path to file to store in
  1611.                 [replacing  yes/no]  -- replace or append data
  1612.                 [type  type class]  -- type of file (default TEXT)
  1613.                 [creator  'sign']  -- creator of file (default 'ttxt')
  1614.                 [erase  boolean]  -- with/without erase   erase or not the
  1615. file before
  1616.                                      write (default yes)
  1617.         Result:   integer  -- error returned from storing (if any)
  1618.  
  1619.  
  1620. Here is what I put in my script:
  1621.  
  1622.         save data newdata in refNum replacing yes
  1623.  
  1624. where newdata is a variable containing a list of data, and refNum is a
  1625. variable containing the path to the file I want to write to.
  1626.  
  1627. Whenever I run the script, it chokes on the line above, saying "Can't make
  1628. some data into the expected type."
  1629.  
  1630. What am I doing wrong?
  1631.  
  1632. Thanks,
  1633. Chris
  1634. =========================================================================
  1635. Date:         Tue, 5 Apr 1994 20:44:26 -0700
  1636. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1637. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1638. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  1639. Subject:      Re: A bunch of stuff
  1640.  
  1641. Jon Pugh (initially quoting me)
  1642.  
  1643. >>What the FKEY doesn't seem to work with is Finder Scripting Extension (ie,
  1644. >>the "Scriptable Finder").  The crash PC is (per Macsbug as seen on my 8100)
  1645. >>1DA bytes into the CODE resource named "%EntryVector" [a quite reasonable
  1646. >>place to crash]).  Crash seen both with Finder 7.1.3/Finder Scripting
  1647. >>Extension 1.1 on my IIci, and Finder 7.1.4/Finder Scripting Extension 1.1
  1648. >>on the 8100.  [Proper install from an Installer floppy on the IIci...drag
  1649. >>install of the extension on the Power Mac.]
  1650. >
  1651. >Hmmm, my Finder is the scriptable one and it works fine for me.  Perhaps
  1652. >it's a memory related problem.  I have upped my SIZE resource as described
  1653. >previously.
  1654.  
  1655.  
  1656. Hmmm...the only way I can get the crash to stop is to remove the Finder
  1657. Scripting Extension.  I've given Finder 200,000 extra bytes, in addition to
  1658. the 100,000 extra I had already given it to make OSAMenu and FinderMenu
  1659. happy.  AND I have run with minimal extensions (just the PowerPC Enabler,
  1660. and the Finder-related PPC-related enabler, and Finder Scripting
  1661. Extension).  Nothing else.  Including ditching the SCSI chain to get rid of
  1662. the (outrageously old...MUST update) SilverLining driver from the external
  1663. hard drive.  No Apple Menu Items, no Control Panels (someone carefully
  1664. makes empty folders where those ought to be).
  1665.  
  1666. It would be time to ask Ed, except that I'm quite sure he has more
  1667. important work to do (more important to his management, and more important
  1668. to *me*, to).
  1669.  
  1670. Thanks for your time, Jon...you caused me to explore more deeply than I
  1671. would have.
  1672.    --John
  1673.  
  1674. --
  1675. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  1676. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  1677. =========================================================================
  1678. Date:         Wed, 6 Apr 1994 01:14:21 -0500
  1679. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1680. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1681. From:         "Carl F Steadman (Carl Steadman)" <stead002@MAROON.TC.UMN.EDU>
  1682. Subject:      Eudora & scripts always running...
  1683.  
  1684. I just finished writing an AppleScript which mails an automatic reply to
  1685. mail which is sent to a particular account, and then redirects the mail to
  1686. a human recipient, which seems to work fine. I have NotifyMail opening
  1687. Eudora when mail arrives at the POP server, and then Eudora sending a
  1688. message to my script using "please notify", which then does its stuff.
  1689.  
  1690. Now, to make everything work, I've had to save as an application, and check
  1691. "Stay Open". Is this the nature of "please notify", or am I doing something
  1692. wrong? I'm thinking Eudora should just be able to launch the script, which
  1693. can then quit when it's done, though I could be thinking wrong.
  1694.  
  1695. On a connected note, how does one quit a script which you've instructed to
  1696. stay open, and have told not to put up dialog boxes? If I attempt to quit,
  1697. it just re-launches - which isn't a problem now, but it was annoying, for a
  1698. time, when I wanted to make changes.
  1699.  
  1700. Thanks.
  1701.  
  1702. Carl
  1703.  
  1704.  Carl Steadman  stead002@maroon.tc.umn.edu  612.626.9750
  1705.    http://www.cdtl.umn.edu/carl.html
  1706. =========================================================================
  1707. Date:         Wed, 6 Apr 1994 03:03:46 -0400
  1708. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1709. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1710. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  1711. Subject:      Re: Eudora & scripts always running...
  1712.  
  1713. I've been playing with Eudora's "please notify" for a while now, and I can
  1714. that I think I know what it does, but I still can't get it to work
  1715. completely :-) (see a previous post by me...)
  1716.  
  1717. Anyway, as I recall, I believe that when you send Eudora a please notify
  1718. event, it saves the name of the calling application as a property, so it
  1719. will start up the application if it is not running, even if Eudora has quit
  1720. and been restarted.  The only way to turn this off, I believe is through
  1721. telling Eudora to specifically turn notifying off for that application.
  1722.  
  1723. As far as getting your stay-open script to quit - that sounds like an error
  1724. in the quit handler to me.  I had the same problem.  The script will
  1725. compile fine, but will encounter a run-time error before it hits the
  1726. continue statement, not report the error, abort the quit handler, and just
  1727. stay open.  It's pretty annoying, and it took me a while to figure this one
  1728. out.
  1729.  
  1730.         Good Luck,
  1731.           Sam
  1732.  
  1733. P.S. If you figure out how to access the fields of the messages of the
  1734. message list Eudora returns on the notify event, please post it or send it
  1735. to me, it's probably really easy, but I just can't get it to work.
  1736.  
  1737. >I just finished writing an AppleScript which mails an automatic reply to
  1738. >mail which is sent to a particular account, and then redirects the mail to
  1739. >a human recipient, which seems to work fine. I have NotifyMail opening
  1740. >Eudora when mail arrives at the POP server, and then Eudora sending a
  1741. >message to my script using "please notify", which then does its stuff.
  1742. >
  1743. >Now, to make everything work, I've had to save as an application, and check
  1744. >"Stay Open". Is this the nature of "please notify", or am I doing something
  1745. >wrong? I'm thinking Eudora should just be able to launch the script, which
  1746. >can then quit when it's done, though I could be thinking wrong.
  1747. >
  1748. >On a connected note, how does one quit a script which you've instructed to
  1749. >stay open, and have told not to put up dialog boxes? If I attempt to quit,
  1750. >it just re-launches - which isn't a problem now, but it was annoying, for a
  1751. >time, when I wanted to make changes.
  1752. >
  1753. >Thanks.
  1754. >
  1755. >Carl
  1756. >
  1757. > Carl Steadman  stead002@maroon.tc.umn.edu  612.626.9750
  1758. >   http://www.cdtl.umn.edu/carl.html
  1759. =========================================================================
  1760. Date:         Wed, 6 Apr 1994 07:11:10 -0500
  1761. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1762. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1763. From:         Chris Brannon <cbrannon+@PITT.EDU>
  1764. Subject:      Re: Eudora Script (save & close)
  1765.  
  1766. Allan Marcus wrote:
  1767. >>The trouble is with the "save" and "close" part.  How can I get Eudora to
  1768. >>save the message (not queue it) and close the window?
  1769.  
  1770. >When you say "save", do you mean save to a disk file (try Save As), or sav
  1771. >to the out box, but don't send (queue: never)?
  1772.  
  1773. Allan,
  1774.  
  1775. I mean to save the newly created message to the out box, so I can address
  1776. it, add comments, and send it later.
  1777.  
  1778.  
  1779. Regards,...Chris
  1780. +--------------------------------------------------------------------------
  1781. Christopher B. Brannon                             University of Pittsburgh
  1782. cbrannon+@pitt.edu        THE*TRUTH*IS*OUT*THERE          Political Science
  1783. =========================================================================
  1784. Date:         Wed, 6 Apr 1994 09:07:20 -0500
  1785. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1786. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1787. From:         "Dennis J. Wilkinson, II" <djw@CRASUN.CRA.COM>
  1788. Subject:      Re: Eudora Notify troubles...
  1789.  
  1790. <script deleted>
  1791.  
  1792. >Ok, here's what's going wrong:  The script compiles fine, but during
  1793. >execution it seems to choke on the "set whofrom to (get Sender of
  1794. >thisMessage)" line.  The error I get back follows:
  1795. >
  1796. >Can't get Sender of message 178 of mailbox "In" of mail folder "".
  1797. >
  1798. >The error number is -1728.
  1799.  
  1800. You mean you're actually getting an error code back? For myself (and
  1801. apparently for Steve Dorner as well) the script just stops. Period. No
  1802. errors, no return code, and if it's a standalone, it keeps running and will
  1803. accept future notification events. I don' get it, either.
  1804.  
  1805. I can iterate over the messages in the "In" folder fine, check if they've
  1806. been read, and take action, but that doesn't do anything for me if
  1807. something's been filtered into another folder by Eudora.
  1808.  
  1809. BTW -- if you do something silly, like, say, having Eudora notify an
  1810. applet, trash the applet, and then have Eudora go looking for things that
  1811. don't exist, you can stop notifying everything you notify by removing the
  1812. 'eNot' resource in the Eudora Settings file with the resource mangler of
  1813. your choice. Eudora will  build a new one on the next Notify.
  1814.  
  1815.  
  1816.  
  1817. -- Dennis
  1818.  
  1819. ----------------------------------------------------------------------------
  1820. Dennis J. Wilkinson, II                 : Usual disclaimers apply. If I put
  1821. djw@crasun.cra.com                      : my foot in my mouth, it's my
  1822. Software Engineer                       : fault, and has nothing at all to
  1823. Charles River Analytics, Cambridge MA   : do with CRA, Inc.
  1824. =========================================================================
  1825. Date:         Wed, 6 Apr 1994 09:51:20 -0500
  1826. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1827. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1828. From:         David Myers <myers@ACEC.COM>
  1829. Subject:      Does Frontier allow custom error handling routines?
  1830.  
  1831. Can I put my own custom error handling routine in a Frontier script?
  1832. Searching through the documentation didn't turn up anything.  Failing
  1833. that, can anybody tell me how to work around this problem in Eudora:
  1834.  
  1835. I use a script called mailSorter() to file away mail from some of the
  1836. more voluminous listservs I subscribe to, in order to separate that
  1837. from personal e-mail.  The script relies on the "Sender" field attached
  1838. to most messages generated from a listserv.  I can call Eudora with
  1839. the following script to find out the Sender field:
  1840.  
  1841. on getSender (i) {
  1842.         local (m);
  1843.         with objectModel, Eudora {
  1844.                 m = mailfolder[""].mailbox["In"].message[i].field["Sender"];
  1845.                 return(core.get (id, m));
  1846.                 }}
  1847.  
  1848. Unfortunately, any e-mail message that does not contain a Sender field
  1849. (i.e., all messages *not* generated by a listserv) will cause Eudora to
  1850. report an error, and script execution stops.  Obviously, the proper way
  1851. around this would be to install a custom error handling routine that could
  1852. intercept the error and allow execution to continue with the remaining mail.
  1853.  
  1854. Any ideas on how to tackle this one?  Appreciate your thoughts...
  1855.  
  1856. -David.
  1857. =========================================================================
  1858. Date:         Wed, 6 Apr 1994 07:06:00 PDT
  1859. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1860. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1861. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  1862. Subject:      Re: MACSCRPT Digest - 4 Apr 1994 to 5 Apr 1994
  1863.  
  1864. >Date:    Tue, 5 Apr 1994 14:57:28 PDT
  1865. >From:    Brian Feinberg <brian@IIT.COM>
  1866. >Subject: MacPPP control source
  1867. >
  1868. >    Would it be possible for the author of the MacPPP control OSAX
  1869. >to post the source on gaea? I'm another person who's seen the problem
  1870. >running it from Frontier, and I'd like to take a look at it, maybe make it
  1871. >a UCMD.
  1872.  
  1873. I'm not sure how Frontier operates, but I have found that MacPPP Control
  1874. (actually MacPPP) cannot be used from a Faceless Background Application.
  1875. This is because MacPPP presents its dialing dialog box when connecting.
  1876. Doing this from a FBA is bad news, and the result is almost always a system
  1877. crash of one form or another.  I found this trying to use MacPPP and MacPPP
  1878. Control with System 7 Pro and the Starnine ACOE Internet Gateway.
  1879.  
  1880. If Frontier executes OSAXs from a FBA then it will certainly have the same
  1881. problems.
  1882.  
  1883. Can I still download the Frontier Run-Time from the net?  If so, and if you
  1884. would send me whatever it is I need to repeat the problem using Frontier
  1885. Run-Time, I'll try and work out a solution.
  1886.  
  1887. Finally, a new version of MacPPP Control is in the works.  I expect to
  1888. release it sometime in May after I get my current project to Beta stage.
  1889.  
  1890. -Mark
  1891. =========================================================================
  1892. Date:         Wed, 6 Apr 1994 07:14:44 -0800
  1893. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1894. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1895. From:         David Lewis <lewis@NETCOM.COM>
  1896. Subject:      Re: Does Frontier allow custom error handling routines?
  1897.  
  1898. >Can I put my own custom error handling routine in a Frontier script?
  1899. >Searching through the documentation didn't turn up anything.  Failing
  1900. >that, can anybody tell me how to work around this problem in Eudora:
  1901. >
  1902. >I use a script called mailSorter() to file away mail from some of the
  1903. >more voluminous listservs I subscribe to, in order to separate that
  1904. >from personal e-mail.  The script relies on the "Sender" field attached
  1905. >to most messages generated from a listserv.  I can call Eudora with
  1906. >the following script to find out the Sender field:
  1907. >
  1908. >on getSender (i) {
  1909. >    local (m);
  1910. >    with objectModel, Eudora {
  1911.          try {
  1912. >            m =3D mailfolder[""].mailbox["In"].message[i].field["Sender"];
  1913. >            return(core.get (id, m));
  1914.          else
  1915.              (do something appropriate with other mail)
  1916. >            }}}
  1917. >
  1918. >Unfortunately, any e-mail message that does not contain a Sender field
  1919. >(i.e., all messages *not* generated by a listserv) will cause Eudora to
  1920. >report an error, and script execution stops.  Obviously, the proper way
  1921. >around this would be to install a custom error handling routine that could
  1922. >intercept the error and allow execution to continue with the remaining mail=
  1923. .
  1924. >
  1925. >Any ideas on how to tackle this one?  Appreciate your thoughts...
  1926. >
  1927. >-David.
  1928.  
  1929. The =B3try=B2 verb is what you want. It executes the else clause (and aborts
  1930. execution of the try clause) if the try cause gets a run-time error. It=B9s
  1931. in the DocServer text.
  1932.  
  1933.         David (getting in before John Baxter)
  1934.  
  1935. ------------------------------------------------------------------------
  1936. David Lewis               lewis@netcom.com                (408) 439-2374
  1937. =========================================================================
  1938. Date:         Wed, 6 Apr 1994 10:22:36 -0400
  1939. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1940. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1941. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  1942. Subject:      Re: Eudora Script (save & close)
  1943.  
  1944. >The trouble is with the "save" and "close" part.  How can I get Eudora to
  1945. >save the message (not queue it) and close the window?
  1946. >
  1947. >The Eudora dictionary says:
  1948. >        close  reference
  1949. >        save  reference  -- the object to save
  1950. >
  1951. >I can't figure out what to put in the "reference" part.
  1952.  
  1953. You made a message at the end of the "Out" mailbox.  Don't you just use the
  1954. same reference?  Alternatively, try using the reference:
  1955.  
  1956.    message 1
  1957.  
  1958. And that's it (no mailbox, no mail folder).  "message 1" by itself always
  1959. references the top most window.  I haven't tried this yet, so let me know
  1960. if it works....
  1961.  
  1962. Steve
  1963.  
  1964. ---------------------
  1965.  jonke@gsfc.nasa.gov
  1966. ---------------------
  1967. =========================================================================
  1968. Date:         Wed, 6 Apr 1994 09:23:23 -0500
  1969. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1970. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1971. From:         "Fred.Terry." <pfterry@LKS.CSI.COM>
  1972. Subject:      Scheduler
  1973.  
  1974. Everyone,
  1975.  
  1976. I've just uploaded a demo version of Mark Alldritt's Scheduler to gaea.
  1977. You'll
  1978. find it in
  1979.  
  1980. ftp://gaea.kgs.ukans.edu/applescript/addons/schedulerdemo.hqx
  1981.  
  1982. Have fun.
  1983.  
  1984. pf
  1985.  
  1986.  
  1987. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1988. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  1989. =========================================================================
  1990. Date:         Wed, 6 Apr 1994 11:45:09 -0500
  1991. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1992. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  1993. From:         Allan Marcus <allan_marcus@LANL.GOV>
  1994. Subject:      Re: Eudora Script (save & close)
  1995.  
  1996. >Allan Marcus wrote:
  1997. >>>The trouble is with the "save" and "close" part.  How can I get Eudora to
  1998. >>>save the message (not queue it) and close the window?
  1999. >
  2000. >>When you say "save", do you mean save to a disk file (try Save As), or sav
  2001. >>to the out box, but don't send (queue: never)?
  2002. >
  2003. >Allan,
  2004. >
  2005. >I mean to save the newly created message to the out box, so I can address
  2006. >it, add comments, and send it later.
  2007.  
  2008.  
  2009. This should work, but it doesn't:
  2010.  
  2011. tell application "Eudora"
  2012.         activate
  2013.         set x to make message InsertHere (end of mailbox "Out" of mail
  2014. folder "")
  2015.         set field "To" of x to "allan_marcus@lanl.gov"
  2016.         set field "Subject" of x to "Subject"
  2017.         set field "" of x to "Body-of-message"
  2018.         queue x QueueType 2
  2019. end tell
  2020.  
  2021. If I use "queue x QueueType 1" it does work.  The dictionary says:
  2022.  
  2023.         queue  message  -- The message to queue.
  2024.                 [QueueType  small integer]  -- Now 0, Next 1, Later 2, Never 3.
  2025.                 [When  integer]  -- When to send message, seconds (local time).
  2026.  
  2027. Are 2 and 3 support yet?
  2028.  
  2029. Thanks,
  2030.  
  2031. Allan
  2032.  
  2033. ---------------------------------------
  2034. Allan Marcus
  2035. Los Alamos National Laboratory
  2036. "My opinions are my own, I think..."
  2037.  
  2038. Voice: 505-665-1828
  2039. CIS: 76666,2113
  2040. AppleLink: Allan.Marcus
  2041. e-world/NewtonMail: Allan.M
  2042. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  2043. ---------------------------------------
  2044. =========================================================================
  2045. Date:         Wed, 6 Apr 1994 10:55:21 -0500
  2046. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2047. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2048. From:         Steve Dorner <sdorner@QUALCOMM.COM>
  2049. Subject:      Re: Eudora Script (save & close)
  2050.  
  2051. At 10:42 AM, Allan Marcus wrote:
  2052. >This should work, but it doesn't:
  2053. >        queue x QueueType 2
  2054.  
  2055. You haven't specified the "when" parameter, which is required for a type of
  2056. later.
  2057.  
  2058.  
  2059. >        queue  message  -- The message to queue.
  2060. >                [QueueType  small integer]  -- Now 0, Next 1, Later 2, Never 
  2061. 3.
  2062. >                [When  integer]  -- When to send message, seconds (local 
  2063. time).
  2064.  
  2065. If you want to save it indefinitely, the only way to do it is queue it with
  2066. next and then again with never.
  2067.  
  2068. --
  2069. Steve Dorner, Qualcomm Incorporated
  2070.  "There's nothing wrong with you that can't be cured
  2071.   with a little Prozac and a polo mallet." - Woody Allen
  2072. =========================================================================
  2073. Date:         Wed, 6 Apr 1994 09:08:40 -0700
  2074. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2075. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2076. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2077. Subject:      Re: Does Frontier allow custom error handling routines?
  2078.  
  2079. At 09:51 4/6/94 -0500, David Myers wrote:
  2080.  
  2081. >Can I put my own custom error handling routine in a Frontier script?
  2082. >Searching through the documentation didn't turn up anything.  Failing
  2083. >that, can anybody tell me how to work around this problem in Eudora:
  2084.  
  2085. Yes...starting with Frontier 2.0, the try...else... construct was added.
  2086.  
  2087.     try
  2088.         some statements which might produce an error
  2089.     else
  2090.         do something about the error.
  2091.  
  2092.    Within the else part, the text that would have been in the Error Info
  2093. window is available in the special variable tryError.
  2094.  
  2095. --John
  2096.  
  2097. --John W. Baxter    Port Ludlow, WA USA   jwbaxter@pt.olympus.net
  2098.   UserLand Software support
  2099. =========================================================================
  2100. Date:         Wed, 6 Apr 1994 10:25:23 -0700
  2101. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2102. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2103. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2104. Subject:      Re: MacPPP OSAX under Frontier's FinderMenu
  2105.  
  2106. My immediately-available archives don't go back to the first message under
  2107. this subject.  I just tried this script, as a FinderMenu shared script
  2108. running Frontier 3.0.1 and then running Runtime 3.0.1.  It worked fine in
  2109. both cases.
  2110.  
  2111. frontier.bringToFront ()
  2112. macPPPcontrol.openPPP ()
  2113.  
  2114.  
  2115. Could someone remind me of the original problem?  Thanks.
  2116.  
  2117. --John
  2118.  
  2119. --John W. Baxter    Port Ludlow, WA USA   jwbaxter@pt.olympus.net
  2120.   UserLand Software support
  2121. =========================================================================
  2122. Date:         Wed, 6 Apr 1994 12:39:47 -0600
  2123. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2124. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2125. From:         K J Fox <kjfox@MKE.AB.COM>
  2126. Subject:      Eudora 1.4.2 HELP ME!!!
  2127.  
  2128. I recently converted from 1.4.1 to 1.4.2 and now some of my AppleScripts
  2129. for Eudora don't seem to work.  In particular, I'm trying to set a
  2130. message's status to READ from UNREAD once I've processed it.
  2131. I seem to have used a command "SetData..." in 1.4.1 but it seems to have
  2132. changed as my scripts won't compile.
  2133.  
  2134. Any ideas???
  2135.  
  2136. Ken Fox
  2137.  
  2138. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2139. Kenneth J. Fox
  2140. Rockwell Automation - Allen Bradley Co.
  2141. Milwaukee, WI (414)382-3287
  2142. kjfox@mke.ab.com
  2143. =========================================================================
  2144. Date:         Wed, 6 Apr 1994 10:37:32 PDT
  2145. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2146. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2147. From:         Brian Feinberg <brian@IIT.COM>
  2148. Subject:      Re: MacPPP OSAX under Frontier's FinderMenu
  2149.  
  2150. >From: Mark Alldritt <alldritt@wimsey.com>
  2151. >I'm not sure how Frontier operates, but I have found that MacPPP Control
  2152. >(actually MacPPP) cannot be used from a Faceless Background Application.
  2153. >This is because MacPPP presents its dialing dialog box when connecting.
  2154. >Doing this from a FBA is bad news, and the result is almost always a system
  2155. >crash of one form or another.  I found this trying to use MacPPP and MacPPP
  2156. >Control with System 7 Pro and the Starnine ACOE Internet Gateway.
  2157. >
  2158. >If Frontier executes OSAXs from a FBA then it will certainly have the same
  2159. >problems.
  2160.  
  2161. Well, Frontier isn't an FBA, but an application, and in fact I bring it
  2162. to the front before calling MacPPP Control. Opening MacPPP works fine,
  2163. it's closing it that causes the problem.
  2164.  
  2165. --- Brian
  2166. =========================================================================
  2167. Date:         Wed, 6 Apr 1994 14:24:34 -0500
  2168. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2169. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2170. From:         David Myers <myers@ACEC.COM>
  2171. Subject:      Re: Does Frontier allow custom error handling routines?
  2172.  
  2173. >Yes...starting with Frontier 2.0, the try...else... construct was added.
  2174. >
  2175. >    try
  2176. >        some statements which might produce an error
  2177. >    else
  2178. >        do something about the error.
  2179. >
  2180. >   Within the else part, the text that would have been in the Error Info
  2181. >window is available in the special variable tryError.
  2182. >
  2183. >--John
  2184.  
  2185.  
  2186. The *try* verb???  Sheesh...I never would have thought to look up that name
  2187. in the DocServer.  Apologies for my lame question.  But in self defense, I
  2188. would point
  2189. out that there *ought* to be an index listing under "Error Recovery" or
  2190. something
  2191. like that...:-)
  2192.  
  2193. Thanks to David Lewis for answering as well.
  2194. =========================================================================
  2195. Date:         Wed, 6 Apr 1994 14:57:00 -0400
  2196. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2197. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2198. From:         "peter (p.s.) wilson" <peterw@BNR.CA>
  2199. Subject:      Sequential execution with Frontier Runtime
  2200.  
  2201. Hi,
  2202.  
  2203. I'm writing a number of Installer scripts in Frontier.
  2204.  
  2205. I want to allow customers to select 2 or more scripts and
  2206. launch/run them with Frontier Runtime. This works but the
  2207. scripts do not run sequentially since Apple's Thread Manager
  2208. is loaded. Concurrent execution causes collisions on certain
  2209. control files.
  2210.  
  2211. Frontier.enableAgents (false)  seemed like the answer to limit
  2212. processing to a single script thread but Runtime does not
  2213. support this procedure... sigh.
  2214.  
  2215. Is there another technique or simple solution that would
  2216. allow me to restrict processing to a single script until that
  2217. script is complete?
  2218.  
  2219. Regards,
  2220.  
  2221. Peter Wilson
  2222. Software Support, BNR Ottawa.
  2223. peterw@bnr.ca
  2224. =========================================================================
  2225. Date:         Wed, 6 Apr 1994 12:58:25 -0700
  2226. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2227. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2228. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2229. Subject:      Re: MacPPP OSAX under Frontier's FinderMenu
  2230.  
  2231. >Ok, I've gotten a good copy of MacPPP Control. I've installed it into
  2232. >Frontier using the Load OSAX droplet. The script fragment
  2233. >
  2234. >        if PPPOpened () {
  2235. >            closePPP ()
  2236. >            }
  2237. >
  2238. >works fine if executed from Frontier (placed into a script which is
  2239. >executed from the Quick Script window). If called from FinderMenu, however,
  2240. >it will hang the machine if the closePPP () clause is executed.
  2241.  
  2242. Hi, David...I couldn't find your message in my archives, because I had left
  2243. it in the Eudora In box for attention <sigh!>.
  2244.  
  2245. That is an interesting freeze...it appears to be looping in this code:
  2246.  
  2247.      +000C  0014F972   JSR        fsm_close
  2248.      +0010  0014F976   ADDQ.L     #$4,A7
  2249.      +0012  0014F978   BRA.S      PPPClose+0016
  2250.      +0014  0014F97A   _SystemTask
  2251.      +0016  0014F97C   MOVEA.L    $0008(A6),A0
  2252.      +001A  0014F980  *TST.B      $29FC(A0)
  2253.      +001E  0014F984   BNE.S      PPPClose+0014
  2254.      +0020  0014F986   UNLK       A6
  2255.      +0022  0014F988   RTS
  2256.  
  2257. which is strange...one would have expected that the _SystemTask would let
  2258. whatever needs to happen to change 8(A6) happen (presumably, asynchonous
  2259. completion of a call, clearing a flag).  But...there is the Runtime window
  2260. in front (at least, when I include a frontier.bringToFront ()), with a
  2261. pending update event.  Not the problem...it freezes with the Runtime window
  2262. closed, too.  Hmmm.
  2263.  
  2264. I even went to the length of doing this:
  2265.  
  2266. misc.doScript ('LAND', "macPPPControl.closePPP ()")
  2267.  
  2268. in the shared script, which still froze.  That made very sure that Runtime
  2269. was the application whose world was being used.
  2270.  
  2271. --
  2272. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  2273. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  2274. =========================================================================
  2275. Date:         Wed, 6 Apr 1994 17:38:50 -0500
  2276. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2277. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2278. From:         Steve Dorner <sdorner@QUALCOMM.COM>
  2279. Subject:      Scripting Eudora
  2280.  
  2281. I hear there's been some discussion on this list about scripting Eudora.
  2282.  
  2283. I have started a scripts directory on our ftp site (ftp.qualcomm.com,
  2284. quest/mac/eudora/scripts).  Right now, the only things there are a Frontier
  2285. install file and a very simple AppleScript.  It will be expanded as I have
  2286. time.  I will consider submitted scripts (mail them to me), but I'm not
  2287. going to put anything out there unless I understand exactly what it does.
  2288. Don't submit scripts without source; that's a risk I can't take, for
  2289. obvious reasons.  Also, if you send me a script, please indicate whether or
  2290. not we have your permission to put the script on the ftp site; when in
  2291. doubt, I won't.
  2292.  
  2293. Eudora's Apple Event support is in its infancy.  There are lots of things
  2294. that it ought to be able to do but can't, and it is very picky about a lot
  2295. of things that it should be more flexible about.  The 'aete' was composed
  2296. with very little understanding of what a proper 'aete' should be.  There
  2297. are even a few (gasp) bugs.  All I can say is that this stuff is hard to
  2298. get right and complete the first time, especially with so few examples out
  2299. there and so much else to do.
  2300.  
  2301. My general strategy is to expand the scripting slowly, starting with
  2302. whatever scriptors are most interested in.  (That's been going on for quite
  2303. some time, actually; the improvements in .1 and .2 have been user-driven.)
  2304. But I'd really like to hear from you on what you want most.
  2305.  
  2306. Alas, I don't have the time to read this list, but if you have
  2307. questions/suggestions, you know where to find me.
  2308.  
  2309. --
  2310. Steve Dorner, Qualcomm Incorporated
  2311.  "There's nothing wrong with you that can't be cured
  2312.   with a little Prozac and a polo mallet." - Woody Allen
  2313. =========================================================================
  2314. Date:         Wed, 6 Apr 1994 20:40:45 -0600
  2315. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2316. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2317. From:         Charles Wiltgen <cwiltgen@MCS.COM>
  2318. Subject:      Re: Scripting Eudora
  2319.  
  2320. >I have started a scripts directory on our ftp site (ftp.qualcomm.com,
  2321. >quest/mac/eudora/scripts).
  2322.  
  2323. Great news!
  2324.  
  2325.  
  2326. --
  2327. Charles Wiltgen
  2328. MCSnet/Chicago
  2329. cwiltgen@mcs.net
  2330. =========================================================================
  2331. Date:         Tue, 5 Apr 1994 15:06:43 PDT
  2332. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2333. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2334. From:         network_manager@ALDUS.COM
  2335. Organization: Aldus Corporation, Seattle, WA
  2336. Subject:      NDN:MacPPP control source
  2337.  
  2338. Your mail to the Microsoft Mail Server could not be fully
  2339. delivered!   No Valid Addresses!   It has been deleted.
  2340.  
  2341. Error List:
  2342.   Bad 'To:' Address: David Rogers,Eng@Sea12
  2343. =========================================================================
  2344. Date:         Wed, 6 Apr 1994 21:47:34 -0700
  2345. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2346. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2347. From:         Scott Gruby <Scott_Gruby@HMC.EDU>
  2348. Subject:      Concatenating text
  2349.  
  2350. I am looking for a way to put two strings together in AppleScript.
  2351. Basically I have information in one variable called theRecipient and
  2352. information in another variable called theMessage:
  2353.  
  2354. theRecipient: Scott_Gruby@hmc.edu
  2355. theMessage: testing...
  2356.  
  2357. I want theText to contain:
  2358. To: Scott_Gruby@hmc.edu
  2359. testing...
  2360.  
  2361. Is there an easy way to do this in AS? I have looked at some other scripts
  2362. but haven't been able to find anything.
  2363.  
  2364. Thanks.
  2365.  
  2366. Scott_Gruby@hmc.edu
  2367. =========================================================================
  2368. Date:         Wed, 6 Apr 1994 23:19:21 -0700
  2369. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2370. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2371. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2372. Subject:      Re: Concatenating text
  2373.  
  2374. >I am looking for a way to put two strings together in AppleScript.
  2375. >Basically I have information in one variable called theRecipient and
  2376. >information in another variable called theMessage:
  2377. >
  2378. >theRecipient: Scott_Gruby@hmc.edu
  2379. >theMessage: testing...
  2380. >
  2381. >I want theText to contain:
  2382. >To: Scott_Gruby@hmc.edu
  2383. >testing...
  2384. >
  2385. >Is there an easy way to do this in AS? I have looked at some other scripts
  2386. >but haven't been able to find anything.
  2387.  
  2388. set theRecipient to "Scott_Gruby@hmc.edu"
  2389. set theMessage to "testing..."
  2390. set theText to theRecipient & return & theMessage
  2391. theText
  2392.  
  2393. produces
  2394.  
  2395. "Scott_Gruby@hmc.edu
  2396. testing..."
  2397.  
  2398. in the result window.  [When in doubt, think HyperCard.  You'll be close.]
  2399.  
  2400. --
  2401. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  2402. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  2403. =========================================================================
  2404. Date:         Thu, 7 Apr 1994 01:17:11 -0700
  2405. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2406. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2407. From:         Jon Pugh <jonpugh@NETCOM.COM>
  2408. Subject:      Re: Quit handlers
  2409.  
  2410. >As far as getting your stay-open script to quit - that sounds like an error
  2411. >in the quit handler to me.  I had the same problem.  The script will
  2412. >compile fine, but will encounter a run-time error before it hits the
  2413. >continue statement, not report the error, abort the quit handler, and just
  2414. >stay open.  It's pretty annoying, and it took me a while to figure this one
  2415. >out.
  2416.  
  2417. If this happens to you, use shift-cmd-Q key to skip the quit handler.
  2418.  
  2419. Jon
  2420. =========================================================================
  2421. Date:         Thu, 7 Apr 1994 01:17:20 -0700
  2422. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2423. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2424. From:         Jon Pugh <jonpugh@NETCOM.COM>
  2425. Subject:      Re: Eudora 1.4.1
  2426.  
  2427. >I recently converted from 1.4.1 to 1.4.2 and now some of my AppleScripts
  2428. >for Eudora don't seem to work.  In particular, I'm trying to set a
  2429. >message's status to READ from UNREAD once I've processed it.
  2430. >I seem to have used a command "SetData..." in 1.4.1 but it seems to have
  2431. >changed as my scripts won't compile.
  2432.  
  2433. Eudora 1.4.1 used nonstandard GetData & SetData events.  They were removed
  2434. in 1.4.2 in favor of the standard and implicit get and the explicit set
  2435. command.  Typically you can simply remove the GetData and change SetData to
  2436. simply set.
  2437.  
  2438. Jon
  2439. =========================================================================
  2440. Date:         Thu, 7 Apr 1994 04:48:39 -0500
  2441. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2442. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2443. From:         Cepol <abduls@RPI.EDU>
  2444. Subject:      Eudora 1.4.2 & Set
  2445.  
  2446. Hai there,
  2447.         I'm trying to script eudora to redirect some mail to my other
  2448. account. However, I did't want to keep any copy of the massage that I
  2449. redirect. My default is keep message. Here is my script
  2450.  
  2451. redirect message 1 of mailbox "In" of mail folder ""
  2452. set field "To" of message "" to "abduls@mts.rpi.edu"
  2453. set KeepCopy of message "" to false
  2454.  
  2455. This script work fine, but Eudora still keep a copy of the mail that being
  2456. redirect. Then I did the following test
  2457.  
  2458.      1) If I made my default to not keep copy, and do the following script
  2459.  
  2460.                 set KeepCopy of message "" to true
  2461.  
  2462.         The script do what it should do (i.e eudora will set KeepCopy to TRUE).
  2463.  
  2464.  
  2465.      2) If I made my default to not keep copy, and do the following script
  2466.  
  2467.         set KeepCopy of message "" to false
  2468.  
  2469.         Eudora will set KeepCopy to TRUE, which it shouldn't do.
  2470.  
  2471.  
  2472. Could someone help me on this, or confirm me that this is a bug in Eudora.
  2473.  
  2474.  
  2475. ----------------------------------------------------------------------------
  2476. SAIFUL AZUAN ABDUL AZIZ RENSSELAER POLYTECHNIC INSTITUTE TROY NEW YORK 12180
  2477.          INTERNET:abduls@rpi.edu AOL: AZRIN PHONE:518-273-0549
  2478.        US-MAIL:1004 PEOPLES AVENUE, 2nd FLOOR, TROY, NEW YORK 12180
  2479. DISCLAIMER:WHAT SHOULD I SAY OVER HERE? I DON'T KNOW. CAN YOU FIGURE IT OUT?
  2480. ----------------------------------------------------------------------------
  2481. =========================================================================
  2482. Date:         Thu, 7 Apr 1994 11:16:00 -0500
  2483. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2484. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2485. From:         Igor Livshits <igorl@UIUC.EDU>
  2486. Subject:      Get current Eudora selection
  2487.  
  2488. Howdy,
  2489.  
  2490. I am looking for a code snippet that gets a current Eudora selection (text
  2491. selected in the body of the current message, e.g.). If someone has done
  2492. this, could you please enlighten me?
  2493.  
  2494. Thanks, Igor
  2495.  
  2496. _____
  2497. =========================================================================
  2498. Date:         Thu, 7 Apr 1994 14:55:32 -0500
  2499. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2500. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2501. From:         Igor Livshits <igorl@UIUC.EDU>
  2502. Subject:      Get current Eudora selection
  2503.  
  2504. Howdy,
  2505.  
  2506. Earlier today I asked:
  2507. >I am looking for a code snippet that gets a current Eudora selection (text
  2508. >>selected in the body of the current message, e.g.). If someone has done this,
  2509. >>could you please enlighten me?
  2510.  
  2511. Unfortunately, Steve Dorner replied:
  2512. >Can't be done.
  2513. >
  2514. >--
  2515. >Steve Dorner, Qualcomm Incorporated
  2516.  
  2517. Bummer, there goes my brilliant idea of selecting an URL, pulling down a
  2518. menu, and having Anarchie fetch it in the background :(
  2519.  
  2520. Igor
  2521.  
  2522. _____
  2523. =========================================================================
  2524. Date:         Thu, 7 Apr 1994 14:30:37 -0700
  2525. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2526. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2527. From:         David Ray <daver@NETCOM.COM>
  2528. Subject:      Re: Get current Eudora selection
  2529.  
  2530. Igor Livshits <igorl@UIUC.EDU> wrote:
  2531. >>I am looking for a code snippet that gets a current Eudora selection (text
  2532. >>selected in the body of the current message, e.g.). If someone has done this,
  2533. >>could you please enlighten me?
  2534.  
  2535. Steve Dorner replied:
  2536. >Can't be done.
  2537.  
  2538. There may be a way to to do this, using the MenuEvents extension or with
  2539. the AutoType osax.
  2540.  
  2541. The MenuEvents
  2542. extension adds Applescript functionality by allowing you to use any
  2543. menu item in an application that is apple event aware, even if that
  2544. menu item isn't in the scripting suite. You should be able to specify
  2545. in a script something like "item 3 of menu 2" corresponding to Copy.
  2546. Then go to the other application, and specify "item 4 of menu 2"
  2547. (or whatever it is) to paste the data into the other app.
  2548.  
  2549. You could also do this with AutoType osax if the Copy and Paste have
  2550. command keys (which they usually do in most apps). Highlight the text
  2551. you want, then have a section in your script with:
  2552.  
  2553. Autotype "c" holding "command" -- this will copy the highlighted text
  2554. tell app "whatever" to activate
  2555. Autotype "v" holding "command" -- this will paste the clipboard
  2556.  
  2557. Let me know if this works.
  2558.  
  2559. -Dave
  2560. daver@netcom.com
  2561. =========================================================================
  2562. Date:         Thu, 7 Apr 1994 15:38:50 MDT
  2563. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2564. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2565. From:         Mel Walker <Mel_Walker@NOVELL.COM>
  2566. Subject:      MacHack - information wanted
  2567.  
  2568. Field-1:
  2569. Can anyone send me some information about this year's MacHack, or point me to a
  2570.  source? Thanks. BTW, how many people usually attend?
  2571. --Mel Walker
  2572. mwalker@novell.com
  2573.  
  2574.  
  2575. ---Begin attached file "QMFORM.FRM".Z---
  2576.  
  2577. begin 666 "QMFORM.FRM".Z
  2578. M'YV048Q(:1*E"9(I ,@H*&CDR4 7 IN$T(    MH8 !8> 0O0+T8':?Q @4@
  2579. MA#8?  0 D+&RR90C10#(G$FSILT  '#BM,FSIJ8F$7L*I:DSYU"A:!H.Y&GC
  2580. M:-.B1X4VG1E 1(!X*0&(F:DG0#L !68. , @ *":?&0&\' 5[$P" !( <&$4
  2581. M0!(S5+;:9'&4+]2H//F2.="DCIP60>#  4!!01,H4)P@.2($2I D )C,F;.3
  2582. (*H '0R+4E0F4
  2583.  
  2584. end
  2585.  
  2586. ---End attached file "QMFORM.FRM".Z---
  2587. =========================================================================
  2588. Date:         Thu, 7 Apr 1994 17:46:16 -0500
  2589. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2590. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2591. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  2592. Subject:      FrontMost Crash
  2593.  
  2594. Hello,
  2595.  
  2596.  I am writing a simple test client-server system where the client is a an
  2597. AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
  2598. app.  The problem I am having is that when the FaceSpan command "make new
  2599. listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes  )
  2600. or drops down into MacsBug. It is not consistent.
  2601.  
  2602.  I have tried all kinds of things:
  2603.  
  2604.     I am only using the extensions I need.
  2605.     I have tried  saving the FaceSpan app as a complete app or a mini app.
  2606.     I wrapped a try-error handler around the troublemaker line.
  2607.  
  2608. When I call the "AddFile"  handler from within the Server app itself it
  2609. works fine, but when I call the handler from a client script,  I get the
  2610. hang.
  2611.  
  2612.  I don't know what to try next.  Anybody out there experience this type of
  2613. problem? I have not seen too much discussion of FrontMost on this list. I
  2614. hope it is OK to ask this type of question here.
  2615.  
  2616. ========
  2617.  
  2618. Here are the scripts that make up the system. I cut out all the other
  2619. stuff. This code still bombs. By the way I am running System 7 Pro on an
  2620. fx.
  2621.  
  2622.  Thanks.
  2623.  
  2624.  
  2625. Client Script
  2626. -----------------
  2627. tell application "Server"
  2628.         activate
  2629.         AddFile("junk")
  2630.         activate current application
  2631. end tell
  2632.  
  2633.  
  2634. "Server Script" in FrontMost Project Script
  2635. ---------------------------------------------------------
  2636. on AddFile(theFile)
  2637.       open window "Files To Get"
  2638.       set theListBox to listbox "File List" of window "Files To Get"
  2639.      -- I have a valid reference here. I checked using display dialog.
  2640.       make new listbox item at end of theListBox with properties
  2641. {contents:"junk"}
  2642. end AddFile
  2643.  
  2644. --
  2645. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2646. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2647. sshws@convx1.lerc.nasa.gov
  2648. AppleLink: SCHILLING.H
  2649. =========================================================================
  2650. Date:         Thu, 7 Apr 1994 19:46:21 -0500
  2651. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2652. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2653. From:         Chris Brannon <cbrannon+@PITT.EDU>
  2654. Subject:      Re: Eudora script (save & close)
  2655.  
  2656. >You made a message at the end of the "Out" mailbox.  Don't you just use the
  2657. >same reference?  Alternatively, try using the reference:
  2658. >
  2659. >   message 1
  2660.  
  2661. A reasonable suggestion, but "save message 1" generates an error (Eudora
  2662. doesn't understand).  "save message" doesn't work either.
  2663.  
  2664. Very frustrating....
  2665.  
  2666. Chris
  2667. =========================================================================
  2668. Date:         Fri, 8 Apr 1994 16:28:31 +0100
  2669. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2670. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2671. From:         Johan Solve <johan.solve@ITN.HH.SE>
  2672. Subject:      Re: Get current Eudora selection
  2673.  
  2674. > Howdy,
  2675. >
  2676. > Earlier today I asked:
  2677. > >I am looking for a code snippet that gets a current Eudora selection (text
  2678. > >>selected in the body of the current message, e.g.). If someone has done
  2679. >this,
  2680. > >>could you please enlighten me?
  2681. >
  2682. > Unfortunately, Steve Dorner replied:
  2683. > >Can't be done.
  2684. > >
  2685. > >--
  2686. > >Steve Dorner, Qualcomm Incorporated
  2687. >
  2688. > Bummer, there goes my brilliant idea of selecting an URL, pulling down a
  2689. > menu, and having Anarchie fetch it in the background :(
  2690. >
  2691. > Igor
  2692.  
  2693. Can't you just make a "copy" from the Edit menu? Isn't there an osax to
  2694. force any application to make a copy?
  2695.  
  2696. BTW, I made a script that takes a file list from the clipboard (previously
  2697. copied from info-mac digest with EasyView, manually at this state) and
  2698. tells Anarchie to download all those files. It hangs sometimes, for some
  2699. unknown reason, and it doesn't handle file not found-cases. It uses some
  2700. osaxen (clipboard and switch to launcher).
  2701. I enclose the script, if anyone finds it interesting. Comments are welcome.
  2702.  
  2703.  
  2704. set filelist to the clipboard
  2705. if filelist begins with "info-mac" then
  2706.     with timeout of 60 * 60 seconds
  2707.         tell application "Anarchie" to activate
  2708.         switch to launcher
  2709.         set site to "ftp.sunet.se:/pub/mac/" -- my local mirror
  2710.         repeat with i from 1 to the number of paragraphs of filelist
  2711.             set currentfile to paragraph i of filelist
  2712.             if currentfile is not "" then
  2713.                 set filetoget to site & paragraph i of filelist
  2714.                 tell application "Anarchie" to fetch url filetoget
  2715.             end if
  2716.         end repeat
  2717.     end timeout
  2718. else
  2719.     beep
  2720. end if
  2721.  
  2722. _______________________________________________________________________
  2723.           "
  2724.    JOHAN SOLVE                   Department of Science and Technology
  2725.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  2726. =========================================================================
  2727. Date:         Fri, 8 Apr 1994 10:24:42 -0600
  2728. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2729. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2730. From:         Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
  2731. Subject:      Mystery AppleEvents and AE Registry ???
  2732.  
  2733. I recently added a wildcard handler for AppleEvents to my application, and
  2734. all sorts of strange events started showing up. First, does anyone have any
  2735. clue what the following events are, and where they might be documented?
  2736. (They all are received in response to an OSADoScript call in my
  2737. application)
  2738.  
  2739. AppleEvent Class = ascr, ID = gdut
  2740. AppleEvent Class = syso, ID = ntoc
  2741. AppleEvent Class = misc, ID = curd
  2742. AppleEvent Class = ears, ID = lfdr
  2743.  
  2744. Second, is there a more recent copy of the AppleEvents Registry than the
  2745. Winter 1992 issue? That's all I found on the most recent dev. CD, and it
  2746. seems pretty out of date.
  2747.  
  2748. (If possible, please cc: me directly on any responses. I'm only receiving
  2749. digests of this list right now.)
  2750.  
  2751. --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  2752. Chuck Shotton                             \
  2753. Assistant Director, Academic Computing     \   "Shut up and eat your
  2754. U. of Texas Health Science Center Houston   \    vegetables!!!"
  2755. cshotton@oac.hsc.uth.tmc.edu  (713) 794-5650 \
  2756. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
  2757. =========================================================================
  2758. Date:         Fri, 8 Apr 1994 10:29:28 -0800
  2759. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2760. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2761. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  2762. Subject:      Re: FrontMost Crash
  2763.  
  2764. 1. What is FaceSpan? If you are running early FrontMost code I'd recommend
  2765. you get the latest FrontMost. Why troubleshoot an environment that no one
  2766. else is using?
  2767.  
  2768. 2. Your line of code "make new listbox item at end of theListBox with
  2769. properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2770. not by any means a FrontMost expert but I do not see how this code is
  2771. supposed to know what to do. What is "end of theListBox"? I'd say start
  2772. small by making a listbox item in code. Then gradually define all it's
  2773. properties. THEN, use it in your application.
  2774.  
  2775.  
  2776. >"Server Script" in FrontMost Project Script
  2777. >---------------------------------------------------------
  2778. >on AddFile(theFile)
  2779. >      open window "Files To Get"
  2780. >      set theListBox to listbox "File List" of window "Files To Get"
  2781. >     -- I have a valid reference here. I checked using display dialog.
  2782. >      make new listbox item at end of theListBox with properties
  2783. >{contents:"junk"}
  2784. >end AddFile
  2785.  
  2786.  
  2787. Kee Nethery
  2788.  
  2789. _________________________________________________________________
  2790. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  2791. =========================================================================
  2792. Date:         Fri, 8 Apr 1994 14:46:02 -0400
  2793. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2794. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2795. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  2796. Subject:      Re: FrontMost Crash
  2797. In-Reply-To:  <no.id> from "Kee Nethery +1 510 843 6140" at Apr 8,
  2798.               94 10:29:28 am
  2799.  
  2800. --Kee Nethery wrote:
  2801. >
  2802. >1. What is FaceSpan?
  2803.  
  2804.     FaceSpan is the new name for Frontmost. The compnay that actually
  2805. makes Frontmost is going to be marketing the product themselves,
  2806. starting with the new version. To differentiate their product from the
  2807. one bundled with AppleScript they have changed the name to FaceSpan.
  2808. Personally, I think the new name sucks, and judging by the discussions
  2809. on AppleLink, so does just about everyone else.
  2810.  
  2811. >If you are running early FrontMost code I'd recommend you get the latest
  2812. >FrontMost. Why troubleshoot an environment that no one else is using?
  2813.  
  2814.     Well, there really weren't any changes from the beta Frontmost, to
  2815. the release version. The release version is more stable, but all of the
  2816. code should be exactly the same.
  2817.  
  2818. >2. Your line of code "make new listbox item at end of theListBox with
  2819. >properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2820. >not by any means a FrontMost expert but I do not see how this code is
  2821. >supposed to know what to do.
  2822.  
  2823.     I will preface this by saying that I don't know why Frontmost isn't
  2824. working for the original poster, however, this particular statement is
  2825. quite correct. It is possible to create window items using Frontmost
  2826. code.
  2827.  
  2828. >What is "end of theListBox"?
  2829.  
  2830.     This is the location for the new item to be created. Whenever you
  2831. call the make command you must specify a destination, this is the same
  2832. for the duplicate command and the move command.
  2833.  
  2834. >I'd say start small by making a listbox item in code. Then gradually
  2835. >define all it's properties. THEN, use it in your application.
  2836.  
  2837.     First of all, he is making the listbox item in code, that's the
  2838. whole point of this script. Second, according to the syntax of the call
  2839. you are supposed to define all non-default properties at the time of the
  2840. creation.
  2841.  
  2842. >>"Server Script" in FrontMost Project Script
  2843. >>---------------------------------------------------------
  2844. >>on AddFile(theFile)
  2845. >>      open window "Files To Get"
  2846. >>      set theListBox to listbox "File List" of window "Files To Get"
  2847. >>     -- I have a valid reference here. I checked using display dialog.
  2848. >>      make new listbox item at end of theListBox with properties
  2849. >>{contents:"junk"}
  2850. >>end AddFile
  2851.  
  2852.     My one gripe with this script is the original poster doesn't appear
  2853. to be using the subroutine parameter theFile. He might also need to set
  2854. theListBox to a reference to the listbox, rather than the listbox
  2855. itself.
  2856.  
  2857. -Hades
  2858. =========================================================================
  2859. Date:         Fri, 8 Apr 1994 16:11:06 -0500
  2860. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2861. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2862. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  2863. Subject:      Re: FrontMost Crash
  2864.  
  2865. >1. What is FaceSpan?
  2866.  
  2867. It is the new name for FrontMost. I don't know why they changed it.
  2868.  
  2869. >If you are running early FrontMost code I'd recommend
  2870. >you get the latest FrontMost. Why troubleshoot an environment that no one
  2871. >else is using?
  2872.  
  2873. I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
  2874. If there is a newer version out there I would like to know about it.
  2875.  
  2876. >
  2877. >2. Your line of code "make new listbox item at end of theListBox with
  2878. >properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2879. >not by any means a FrontMost expert but I do not see how this code is
  2880. >supposed to know what to do. What is "end of theListBox"?
  2881.  
  2882. "end of theListBox" is relative reference form telling FrontMost where to
  2883. put the new listbox item I just made. I know this is good code, because
  2884. when I call this handler from inside the app that has the handler it works
  2885. fine.
  2886.  
  2887. > I'd say start
  2888. >small by making a listbox item in code. Then gradually define all it's
  2889. >properties. THEN, use it in your application.
  2890. >
  2891.  
  2892. I tried doing it without defining any properties but it did not help.
  2893.  
  2894. Thanks for the reply. I am still stumped.
  2895.  
  2896. --
  2897. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2898. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2899. sshws@convx1.lerc.nasa.gov
  2900. AppleLink: SCHILLING.H
  2901. =========================================================================
  2902. Date:         Fri, 8 Apr 1994 16:31:18 -0500
  2903. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2904. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2905. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  2906. Subject:      Re: FrontMost Crash
  2907.  
  2908. ...
  2909. Stuff deleted from Brian V. Hughes reply. I agree with Brian on everything,
  2910. including the lousy new name for FaceSpan.
  2911. ...
  2912.  
  2913.  
  2914. >Brian V. Hughes wrote:
  2915. >
  2916. >    My one gripe with this script is the original poster doesn't appear
  2917. >to be using the subroutine parameter theFile. He might also need to set
  2918. >theListBox to a reference to the listbox, rather than the listbox
  2919. >itself.
  2920. >
  2921.  
  2922. The reason I did not use "the subroutine parameter theFile" is because in
  2923. my original full script I did use it. I stripped out a lot of stuff to try
  2924. to narrow down the problem. I guess I should have gotten rid of the
  2925. parameter also. I will try it even though I don't see why it should cause a
  2926. problem. I will have to think about the reference business. Thanks for the
  2927. suggestions, Brian.
  2928.  
  2929. --
  2930. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2931. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  2932. sshws@convx1.lerc.nasa.gov
  2933. AppleLink: SCHILLING.H
  2934. =========================================================================
  2935. Date:         Fri, 8 Apr 1994 15:15:53 -0800
  2936. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2937. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2938. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  2939. Subject:      Re: FrontMost Crash
  2940.  
  2941. Sorry I was unable to offer any useful suggestions. AppleScript seems
  2942. extremely useful but boy the debugging tools and applications are a long
  2943. ways from making this easy. Good luck.
  2944. Kee
  2945.  
  2946. >>1. What is FaceSpan?
  2947. >
  2948. >It is the new name for FrontMost. I don't know why they changed it.
  2949. >
  2950. >>If you are running early FrontMost code I'd recommend
  2951. >>you get the latest FrontMost. Why troubleshoot an environment that no one
  2952. >>else is using?
  2953. >
  2954. >I am running FrontMost 1.0 which is what came with the AppleScript 1.1 Kit.
  2955. >If there is a newer version out there I would like to know about it.
  2956. >
  2957. >>
  2958. >>2. Your line of code "make new listbox item at end of theListBox with
  2959. >>properties {contents:"junk"}" seems incorrect. I must admit that I am still
  2960. >>not by any means a FrontMost expert but I do not see how this code is
  2961. >>supposed to know what to do. What is "end of theListBox"?
  2962. >
  2963. >"end of theListBox" is relative reference form telling FrontMost where to
  2964. >put the new listbox item I just made. I know this is good code, because
  2965. >when I call this handler from inside the app that has the handler it works
  2966. >fine.
  2967. >
  2968. >> I'd say start
  2969. >>small by making a listbox item in code. Then gradually define all it's
  2970. >>properties. THEN, use it in your application.
  2971. >>
  2972. >
  2973. >I tried doing it without defining any properties but it did not help.
  2974. >
  2975. >Thanks for the reply. I am still stumped.
  2976. >
  2977. >--
  2978. >Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  2979. >Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000
  2980. >sshws@convx1.lerc.nasa.gov
  2981. >AppleLink: SCHILLING.H
  2982.  
  2983. _________________________________________________________________
  2984. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  2985. =========================================================================
  2986. Date:         Fri, 8 Apr 1994 17:04:02 -0700
  2987. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2988. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  2989. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  2990. Subject:      Re: Mystery AppleEvents and AE Registry ???
  2991.  
  2992. >Second, is there a more recent copy of the AppleEvents Registry than the
  2993. >Winter 1992 issue? That's all I found on the most recent dev. CD, and it
  2994. >seems pretty out of date.
  2995.  
  2996. Chuck,
  2997.    I don't know of a whole new registry.  There is an list of errata to the
  2998. Winter '92 registry (also on the CDs, I think), and a small erratum to the
  2999. errata (but nothing erotic).
  3000.  
  3001.    There have been new suites defined, and registry sections for those are
  3002. here and there on the CDs:  Word Services, Telephony, Table (I think new
  3003. since Winter '92), etc.  And more are in the works.
  3004.  
  3005.  
  3006. If I don't see answers flow by regarding the events you ask about, I'll try
  3007. to find out what they are.
  3008.  
  3009.    'ascr' suggests AppleScript...that's the AppleScript suite.  'syso' is a
  3010. sort of catch-all, which many of the AppleScript Scripting Additions use
  3011. when nothing else fits ("system operation" or something).  'misc' 'curd' is
  3012. old milk <sorry>.
  3013.  
  3014.  
  3015. --
  3016. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  3017. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  3018. =========================================================================
  3019. Date:         Sat, 9 Apr 1994 02:00:26 -0700
  3020. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3021. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3022. From:         Jon Pugh <jonpugh@NETCOM.COM>
  3023. Subject:      Re: FaceSpam
  3024.  
  3025. >It is the new name for FrontMost. I don't know why they changed it.
  3026.  
  3027. The rumor I heard is that the Frontier people thought that the Frontmost
  3028. name was too close for comfort and complained.  Go figure.
  3029.  
  3030. Jon
  3031. =========================================================================
  3032. Date:         Sat, 9 Apr 1994 02:00:23 -0700
  3033. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3034. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3035. From:         Jon Pugh <jonpugh@NETCOM.COM>
  3036. Subject:      Re: Unknown Events
  3037.  
  3038. >AppleEvent Class = ascr, ID = gdut
  3039.  
  3040. GetData User Terminology.  This is the event AppleScript sends to get your
  3041. aete resource.  If an app isn't running it simply opens the app and does a
  3042. GetResource.  If it is open, then it sends this event.  Most apps don't
  3043. handle it and thus AppleScript's system event handler does.  It calls
  3044. GetResource and returns the resource.  Kind of slick.
  3045.  
  3046. These three are all standard scripting additions:
  3047.  
  3048. >AppleEvent Class = syso, ID = ntoc
  3049.  
  3050.         ASCII character (String Commands)
  3051.  
  3052. >AppleEvent Class = misc, ID = curd
  3053.  
  3054.         current date (Current Date)
  3055.  
  3056. >AppleEvent Class = ears, ID = lfdr
  3057.  
  3058.         list folder (File Commands)
  3059.  
  3060. As for the Apple Event Registry, I was the Registrar, but they decided that
  3061. that job position wasn't needed and that the Registry was complete.  I was
  3062. laid off last July.  Nothing has or will be done to the Registry.
  3063. Apparently the OpenDoc people at CIL have publicly accepted responsibility
  3064. for the Registry, although they haven't done anything with it yet either.
  3065.  
  3066. Jon
  3067. =========================================================================
  3068. Date:         Fri, 8 Apr 1994 04:41:03 LCL
  3069. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3070. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3071. From:         Rick Zeman <rick.zeman@HIS.COM>
  3072. Organization: Heller Info Services (info@his.com) Near DC
  3073. Subject:      Haunted...
  3074.  
  3075. Got a weird one here, folks:  at the end on a bunch of SITcomm AS 1.1 launch
  3076. scripts, I had a launch statement for a non-scriptable application (Rick
  3077. Holzgraffe's SignatureQuote).
  3078.  
  3079. I used an osax to see if it's running and if the result was false, I launched
  3080. it (not 'told' it).  Worked like a champ.
  3081.  
  3082. Problem is now that I'm not using a 68000 anymore, I don't need to do that
  3083. anymore (don't ask).  So I removed all of the statements from the scripts and
  3084. recompiled.  BUT THE FREAKING THING STILL LAUNCHES EVERY TIME! even though
  3085. it's not being referred to at all.
  3086.  
  3087. Even a simple script like
  3088.  
  3089. tell application "SITcomm*"
  3090.         activate
  3091.         Connect "Twilight Clone"
  3092. end tell
  3093.  
  3094. causes it to launch.
  3095.  
  3096. I'm lost.  What on earth is going on here?
  3097.  
  3098.  
  3099. ___________________________________________________________________________
  3100. Rick Zeman                                "Wer nie sein Brot mit Tranen ass
  3101. rzeman@his.com                              Wer nie die kummervollen Nachte
  3102. Fidonet: 1:109/70.943                          Auf seinem Bette weinend sas
  3103.                              Der kennt euch nicht, ihr himmlishcen Machte."
  3104.                                            -- Goethe, "Wilhelm Meister"
  3105. =========================================================================
  3106. Date:         Sun, 10 Apr 1994 13:16:06 -0700
  3107. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3108. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3109. From:         Benjamin Broder <bbroder@HSC.USC.EDU>
  3110. Subject:      Script runs from ScriptEditor, not from FMPRO
  3111.  
  3112. I have a script that takes some information from
  3113. a Filemaker Pro record and creates a calendar entry
  3114. in NOW Up-To-Date corresponding to this information.
  3115.  
  3116. The script runs fine when I run it from the ScriptEditor,
  3117. but when I run it from Filemaker Pro, nothing happens (I
  3118. don't even get an error.)
  3119.  
  3120. I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
  3121. Applescript 1.0. I have the script working when I run
  3122. it from the Script Editor and in FMPro I created a FMPro
  3123. script that sends a "do script" event to my script (saved
  3124. as an application) with the text of the script being "run()".
  3125.  
  3126. Any ideas?
  3127.  
  3128. Ben
  3129.  
  3130. bbroder@hsc.usc.edu     Benjamin Broder    FAX (818) 457-4100
  3131. USC Institute for Health Promotion and Disease Prevention Research
  3132. 1000 S. Fremont Ave. #641, Alhambra, CA 91803-1358 (818) 457-4029
  3133. =========================================================================
  3134. Date:         Sun, 10 Apr 1994 17:02:38 -0700
  3135. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3136. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3137. From:         Jeff Mealiffe <jmealif@EIS.CALSTATE.EDU>
  3138. Subject:      Processing a bunch of files
  3139.  
  3140. I have a problem that I think can easily be solved using AppleScript, and
  3141. I would appreciate some pointers about how to get going.  I need to read
  3142. the data out of about 6,000 text files and put the text from each file
  3143. into a single field in a FileMaker Pro 2.1v1 database.  I already have
  3144. the AppleScript software and the scriptable text editor.  I don't think I
  3145. can use the scriptable text editor to copy and paste because a few of the
  3146. files are more than 32K.  Any ideas?  Please respond to me directly, and
  3147. I'll summarize for the list.
  3148.  
  3149. Thanks in advance,
  3150. -jeff
  3151.  
  3152. Jeff Mealiffe                                Jeff.Mealiffe@netops.lewis.edu
  3153. Mac Consultant/Sys Admin                                    jmealif@ctp.org
  3154. Lewis Junior High School, San Diego, Calif.          jmealif@sierra.fwl.edu
  3155. ** For Information About The Lewis Jr. High Educational Foundation, send **
  3156. ** e-mail to lewis@cerf.net with a subject of "mailserv send foundation" **
  3157. **     (without the quotes).  The system will respond automatically.     **
  3158. =========================================================================
  3159. Date:         Sun, 10 Apr 1994 23:43:24 -0600
  3160. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3161. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3162. From:         Tom Donovan <donovan@COVIS.NWU.EDU>
  3163. Subject:      Eudora & Notify event
  3164.  
  3165. AppleScripters:
  3166.  
  3167. I've got Eudora's Notify event figured out, but is there a way to determine
  3168. that Eudora has checked and found *no* new mail?
  3169.  
  3170. It seems like 'try'-ing with a timeout would only be useful if I could
  3171. determine the approximate time it takes to check for mail over the network.
  3172. Otherwise, I'd run the risk of either not waiting long enough or else
  3173. wasting time waiting to continue processing long after Eudora is finished.
  3174.  
  3175. Has anyone tried anything similar?
  3176.  
  3177. Thanks in advance.
  3178.  
  3179. --Tom
  3180.  
  3181.  
  3182. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3183. Tom Donovan           "Perhaps the most universal information trap is the...
  3184. System Administrator   trap of forgetting what it's like not to know. The
  3185. CoVis Project          minute we know something, we forget what it was like
  3186. Northwestern Univ.     not to know it."
  3187.                                                     --Richard S. Wurman
  3188. E-mail: donovan@covis.nwu.edu                          "Information Anxiety"
  3189. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3190. =========================================================================
  3191. Date:         Mon, 11 Apr 1994 13:07:12 -0500
  3192. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3193. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3194. From:         Allan Marcus <allan_marcus@LANL.GOV>
  3195. Subject:      'is app running' command?
  3196.  
  3197. Is there any way that I can determine if a specific app is running (via AS)?
  3198.  
  3199. Thanks,
  3200.  
  3201.  
  3202. ---------------------------------------
  3203. Allan Marcus
  3204. Los Alamos National Laboratory
  3205. "My opinions are my own, I think..."
  3206.  
  3207. Voice: 505-665-1828
  3208. CIS: 76666,2113
  3209. AppleLink: Allan.Marcus
  3210. e-world/NewtonMail: Allan.M
  3211. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  3212. ---------------------------------------
  3213. =========================================================================
  3214. Date:         Mon, 11 Apr 1994 13:34:58 -0500
  3215. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3216. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3217. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  3218. Subject:      Re: 'is app running' command?
  3219.  
  3220. >Is there any way that I can determine if a specific app is running (via AS)?
  3221.  
  3222. Yes, there are two osaxen that can do this:
  3223.  
  3224. is application running, and list applications.
  3225.  
  3226. Is application running requires a string and returns boolean.
  3227.  
  3228. List applications returns a list of strings (which you can use in something
  3229. like
  3230.  
  3231. if (list applications) contains "<app to check for>"
  3232.  
  3233. )
  3234.  
  3235. King Rhoton                                             king@acpub.duke.edu
  3236. =========================================================================
  3237. Date:         Mon, 11 Apr 1994 14:47:59 -0500
  3238. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3239. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3240. From:         Allan Marcus <allan_marcus@LANL.GOV>
  3241.  
  3242. When I run the following script (copied from the scripting the finder
  3243. document that came with AS 1.1), I get a "--> Source not available." error
  3244. message after selecting the finderlib file from the dialog.  Am I doing
  3245. something wrong?
  3246.  
  3247. ---
  3248. property finderLib : "null"
  3249.  
  3250. if class of finderLib =82 script then
  3251.         set finderLib to load script (choose file with prompt =AC
  3252.                 "Where is the compiled script \"finderLib\"?" of type "osas"=
  3253. )
  3254. end if
  3255. ---
  3256.  
  3257. Thanks,
  3258.  
  3259.  
  3260. ---------------------------------------
  3261. Allan Marcus
  3262. Los Alamos National Laboratory
  3263. "My opinions are my own, I think..."
  3264.  
  3265. Voice: 505-665-1828
  3266. CIS: 76666,2113
  3267. AppleLink: Allan.Marcus
  3268. e-world/NewtonMail: Allan.M
  3269. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  3270. ---------------------------------------
  3271. =========================================================================
  3272. Date:         Mon, 11 Apr 1994 15:11:10 -0400
  3273. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3274. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3275. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3276. Subject:      Re: 'is app running' command?
  3277. In-Reply-To:  <9404111708.AA07655@fiu.edu>
  3278.  
  3279. Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  3280. PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  3281. read Info-Mac regularly, and have copped some of the AppleEvents progs and
  3282. like the power they concede!  Is there a starter kit for Scripting that
  3283. wont put me in the red (a.k.a. Userland's Frontier)?
  3284.  
  3285. Thanx for your time.
  3286. --Luis
  3287. =========================================================================
  3288. Date:         Mon, 11 Apr 1994 15:32:17 -0400
  3289. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3290. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3291. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  3292. Subject:      Re: Script runs from ScriptEditor, not from FMPRO
  3293. In-Reply-To:  <no.id> from "Benjamin Broder" at Apr 10, 94 01:16:06 pm
  3294.  
  3295. --Benjamin Broder wrote:
  3296. >
  3297. >The script runs fine when I run it from the ScriptEditor,
  3298. >but when I run it from Filemaker Pro, nothing happens (I
  3299. >don't even get an error.)
  3300.  
  3301.     Well, there is a very simple reason nothing happens when you try to
  3302. send the "run" command to the script from FM Pro. There's nothing to
  3303. send the do script even to. I'll explain this a little better below...
  3304.  
  3305. >I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
  3306. >Applescript 1.0. I have the script working when I run
  3307. >it from the Script Editor and in FMPro I created a FMPro
  3308. >script that sends a "do script" event to my script (saved
  3309. >as an application) with the text of the script being "run()".
  3310.  
  3311.     If the script has been saved as an application, you can't send it a
  3312. do script event unless you have first sent it an open event. If the
  3313. script application isn't running there will be nothing that can receive
  3314. the event you want to send. Fortunately, all you need to do is send the
  3315. open application event to your script application from FM Pro. This is
  3316. one of the options on the event pop-up menu in FM Pro's Script Maker.
  3317. Making this change should slove your problems.
  3318.  
  3319. -Hades
  3320. =========================================================================
  3321. Date:         Mon, 11 Apr 1994 15:38:56 -0400
  3322. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3323. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3324. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  3325. Subject:      Re: 'is app running' command?
  3326. In-Reply-To:  <no.id> from "Luis Muench" at Apr 11, 94 03:11:10 pm
  3327.  
  3328. --Luis Muench wrote:
  3329. >
  3330. >Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  3331. >PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  3332. >read Info-Mac regularly, and have copped some of the AppleEvents progs and
  3333. >like the power they concede!  Is there a starter kit for Scripting that
  3334. >wont put me in the red (a.k.a. Userland's Frontier)?
  3335.  
  3336.     If you are looking for a real scripting starter's kit, there are a
  3337. couple of options for you. First of all you can buy the AppleScript
  3338. Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
  3339. with a really good set of manuals, including a pretty good Getting
  3340. Started with AppleScript guide. The other choice is to buy one of the
  3341. AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
  3342. Both of these are supposed to be good for the novice scripter. If you
  3343. have any kind of programming background, especially something like
  3344. Hypercard, picking up AppleScript is pretty easy.
  3345.  
  3346. -Hades
  3347. =========================================================================
  3348. Date:         Mon, 11 Apr 1994 15:29:53 -0500
  3349. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3350. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3351. From:         Fred Terry <pfterry@LKS.CSI.COM>
  3352. Subject:      new file on gaea
  3353.  
  3354. I have placed Allan Crump's Date Convert library on gaea in
  3355.  
  3356. ftp://applescript/scripts/DateConvert.sit.hqx
  3357.  
  3358. It converts Applescript date and date-times to Julian integers and reals
  3359. (respectively) for use in calculations where a julian date is needed.
  3360.  
  3361. Enjoy.
  3362.  
  3363. pf
  3364.  
  3365.  
  3366. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  3367. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  3368. =========================================================================
  3369. Date:         Mon, 11 Apr 1994 18:51:16 -0500
  3370. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3371. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3372. From:         Allan Marcus <allan_marcus@LANL.GOV>
  3373. Subject:      Pause?
  3374.  
  3375. Anyone know how to pause a script during runtime?  Here's the situation:
  3376.  
  3377. I am sendind an FTP fetch request to Anarchie.  The file is retreived fine
  3378. via anarchie, and then anarchie launches stuffit expander to decompress.
  3379. Unfortunatley, the applescript is considered done as soon as the download
  3380. is complete, not when stuffit is done!  I figure I can do something like
  3381. this:
  3382.  
  3383. if (is application ruinning("Stuffit")) then
  3384.         pause for a few seconds
  3385. end if
  3386.  
  3387. So, how do I pause with out eating cpu time?
  3388.  
  3389. Any other ideas?
  3390.  
  3391. thanks,
  3392.  
  3393. Allan
  3394.  
  3395.  
  3396. ---------------------------------------
  3397. Allan Marcus
  3398. Los Alamos National Laboratory
  3399. "My opinions are my own, I think..."
  3400.  
  3401. Voice: 505-665-1828
  3402. CIS: 76666,2113
  3403. AppleLink: Allan.Marcus
  3404. e-world/NewtonMail: Allan.M
  3405. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  3406. ---------------------------------------
  3407. =========================================================================
  3408. Date:         Mon, 11 Apr 1994 16:50:36 -0700
  3409. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3410. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3411. From:         David Ray <daver@NETCOM.COM>
  3412. Subject:      Re: Pause?
  3413.  
  3414. Allan Marcus wrote:
  3415.  
  3416. >Anyone know how to pause a script during runtime?  Here's the situation:
  3417. >
  3418. >I am sendind an FTP fetch request to Anarchie.  The file is retreived fine
  3419. >via anarchie, and then anarchie launches stuffit expander to decompress.
  3420. >Unfortunatley, the applescript is considered done as soon as the download
  3421. >is complete, not when stuffit is done!  I figure I can do something like
  3422. >this:
  3423. >
  3424. >if (is application ruinning("Stuffit")) then
  3425. >        pause for a few seconds
  3426. >end if
  3427. >
  3428. >So, how do I pause with out eating cpu time?
  3429.  
  3430. You need to do something like the following. It requires that the script
  3431. is saved as a stay-open application so that you can use the idle..end idle
  3432. handler. This lets you define a "wait period" in seconds that the script
  3433. will wait (and not eat CPU time) before repeating the loop. It's the only
  3434. way I know of that you can pause without eating up CPU time.
  3435.  
  3436. general format:
  3437.  
  3438. global i
  3439. set i to 1
  3440. on idle
  3441.   if i = 1 then
  3442.     <do the first thing>
  3443.     set i to i + 1
  3444.   else if i = 2 then
  3445.     if <a condition is satisfied> then
  3446.       set i to i + 1
  3447.     end if
  3448.   else if i = 3 then
  3449.     <do whatever you want after condition is satisfied>
  3450.     quit
  3451.   end if
  3452.   return n -- n must be an integer representing the no. of seconds that
  3453.               the script pauses before repeating the loop
  3454. end idle
  3455.  
  3456. For your example:
  3457.  
  3458. global i
  3459. set i to 1
  3460. on idle
  3461.   if i = 1 then
  3462.     <section telling Anarchie to do stuff>
  3463.     set i to i + 1
  3464.   else if i = 2
  3465.     if (list applications) does not contain "Stuffit" then
  3466.       set i to i + 1
  3467.     end if  -- It keeps checking if Stuffit is running every 2 seconds
  3468.                and doesn't proceed until Stuffit stops running
  3469.   else if i = 3
  3470.     <whatever you want to do after Stuffit is finished>
  3471.     quit
  3472.   end if
  3473.   return 2  -- wait 2 seconds (without eating CPU time) before
  3474.             -- repeating the loop -- change to whatever idle time you like
  3475. end idle
  3476.  
  3477.  
  3478. Hope this helps
  3479.  
  3480. Dave
  3481.  
  3482. ------------------------------------------------------------------------------
  3483. David Ray                Dream Designs          Music Composition
  3484. daver@netcom.com         PO Box 5631            Interactive Multimedia
  3485. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  3486. =========================================================================
  3487. Date:         Mon, 11 Apr 1994 20:17:57 -0700
  3488. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3489. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3490. From:         William Cook <wrc@NETCOM.COM>
  3491. Subject:      Re: MACSCRPT Digest - 9 Apr 1994 to 10 Apr 1994
  3492.  
  3493. >From:    Benjamin Broder <bbroder@HSC.USC.EDU>
  3494. >Subject: Script runs from ScriptEditor, not from FMPRO
  3495. >...
  3496. >I am running FMPro v2.1.2, NOW Up-To-Date 2.1.1, and
  3497. >Applescript 1.0. I have the script working when I run
  3498. >it from the Script Editor and in FMPro I created a FMPro
  3499. >script that sends a "do script" event to my script (saved
  3500. >as an application) with the text of the script being "run()".
  3501. >
  3502. >Any ideas?
  3503.  
  3504. I think that the problem may be the difference between
  3505. "do script" and "run". In AppleScript, "run" is equivalent
  3506. to "double-click on an application" in the finder, which
  3507. is equivalent to "OAPP" in Apple Event terminology.
  3508. Do Script is something else. Soooo.. Either have FileMaker
  3509. send some other event, or put "on Do Script()" into your
  3510. script.
  3511.  
  3512. Just a guess...
  3513.  
  3514. -William Cook
  3515. BAM! Software, Inc.
  3516. =========================================================================
  3517. Date:         Mon, 11 Apr 1994 23:50:13 -0500
  3518. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3519. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3520. From:         Manuel Veloso <veloso@NETCOM.COM>
  3521. Subject:      osax returning result & error?
  3522.  
  3523. Hi all,
  3524.  
  3525. I'm trying to write a few osaxen, and have come up with kind of a problem.
  3526. The osaxen in question are for DAM/DAL, and one of them has the potential
  3527. to return real data, as well as an error code (DBGetQueryResults). The
  3528. function itself returns an error if there's not enough memory for the whole
  3529. result, but also should return the results that were retrieved.
  3530.  
  3531. Right now, I'm returning the results of the query in the direct object,
  3532. with the error code being stuffed into the keyErrorNumber parameter. Is
  3533. this kosher? Is there some other way to do this? I suppose that DBState
  3534. should return the fact that data is waiting, but as the DAL server is far
  3535. away (I go about once or twice a week), I can't test this for sure.
  3536.  
  3537.  
  3538. Manuel
  3539. =========================================================================
  3540. Date:         Tue, 12 Apr 1994 01:18:00 -0400
  3541. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3542. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3543. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  3544. From:         ab026@FREENET.CARLETON.CA
  3545. Subject:      Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  3546.  
  3547. Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  3548.  
  3549. I have uploaded the newest versions of these three programs to
  3550. ftp://gaea.kgs.ukans.edu/incoming.  Hopefully they will show up
  3551. somewhere in the applescript directory shortly.
  3552.  
  3553. These are *free* programs, part of the AWOL Utilities package
  3554. recently uploaded to sumex and other sites.  (Other sites don't
  3555. have these most recent versions, though.)
  3556.  
  3557. With this software, you can control even non-scriptable applications,
  3558. local or remote, through their menu commands.  There's an 'osax' so
  3559. you can write scripts, and an entertaining application (Menu Grabber)
  3560. that uses Menu Events to reach out and grab a working copy of a
  3561. target application's menu bar.  All that is required of the target is
  3562. that it be Apple-event-aware (support program linking).  Note: There
  3563. are exceptions, including ResEdit, TeachText, and Finders prior to
  3564. 7.1.2.  (Notice a pattern?)
  3565.  
  3566. The programs are fully documented; it's not necessary to have a copy
  3567. of Help on Wheels to read the help files, but it helps.  :-)
  3568.  
  3569. Package contents are as follows:
  3570. Menu_Events_1.1.1.sit.Hqx
  3571.   Menu Events -- system extension supporting system event handler
  3572.   Menu Events Help -- Help on Wheels help file
  3573.   Menu Events Scripting Addition -- 'osax' dictionary
  3574.   Menu Events Sample Script -- sample AppleScript menu control script
  3575.   Menu Events.h -- MPW C header file for programmers
  3576. Menu_Grabber_1.1.1.sit.Hqx
  3577.   Menu Grabber -- application supporting remote control via menus
  3578.   Menu Grabber Help -- Help on Wheels help file
  3579. Help_on_Wheels_1.1.sit.Hqx
  3580.   Help on Wheels -- generic help server
  3581.  
  3582. Read the "About AWOL Utilities 1.1.1" file in each archive for more
  3583. info on the AWOL Utilities package.
  3584.  
  3585. Ross Brown - AWOL Software Productions
  3586. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  3587. publisher of AWOL Utilities - "the best deal in freeware!"
  3588. ab026@freenet.carleton.ca
  3589. =========================================================================
  3590. Date:         Tue, 12 Apr 1994 08:40:05 EDT
  3591. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3592. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3593. From:         "Sean M. Joyce" <sjoyce@HEIDELBERG.EDU>
  3594. Subject:      Anarchie/AppleScript/PPC Question
  3595.  
  3596. Please forgive me if this has been asked before or if this is not the
  3597. appropriate forum, but I am new to both Anarchie and this list.
  3598.  
  3599. Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  3600.  
  3601. Problem is this:  when I try to run the "Get Files" script to use Anarchie
  3602. to download files from an info-mac mirror, the machine bombs with a message
  3603. to the effect of "Floating point coprocessor not installed."
  3604.  
  3605. I understand that, in emulation, the PowerMacs do not provide an FPU.  Does
  3606. one of these programs require it, or is it simply an incompatibility
  3607. between these programs and the emulator?
  3608.  
  3609. TIA for any help.
  3610.  
  3611. --
  3612. Sean Joyce
  3613. sjoyce@heidelberg.edu
  3614. =========================================================================
  3615. Date:         Tue, 12 Apr 1994 06:08:32 PDT
  3616. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3617. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3618. From:         network_manager@ALDUS.COM
  3619. Organization: Aldus Corporation, Seattle, WA
  3620. Subject:      NDN:Anarchie/AppleScript/PPC Question
  3621.  
  3622. Your mail to the Microsoft Mail Server could not be fully
  3623. delivered!   No Valid Addresses!   It has been deleted.
  3624.  
  3625. Error List:
  3626.   Bad 'To:' Address: david.rogers@MSM-Inter
  3627. =========================================================================
  3628. Date:         Tue, 12 Apr 1994 09:54:03 -0400
  3629. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3630. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3631. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  3632. Subject:      Re: pause
  3633.  
  3634. an easier way to pause a script is in this format:
  3635.  
  3636. repeat until <condition>
  3637.  
  3638. end repeat
  3639.  
  3640. in your case, you would want to put "(is application running(stuffit)) is 
  3641. false"
  3642. in the place of <condition>. this will make your script do nothing until
  3643. stuffit is not running.
  3644.  
  3645. --
  3646. My opinions are mine only and tentative, pending further data
  3647.                         Matthew Ahrens
  3648. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  3649. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  3650. =========================================================================
  3651. Date:         Tue, 12 Apr 1994 09:48:52 -0400
  3652. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3653. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3654. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3655. Subject:      Re: 'is app running' command?
  3656. In-Reply-To:  <9404111944.AA18677@fiu.edu>
  3657.  
  3658. Thanx for your reply, Hades...
  3659.         For the benefit of those that may be lurking or would feel
  3660. embarased to ask a stupid question:  Are there any scripting environments
  3661. that are of a Shareware nature?!  Anything comprable to commercial
  3662. offerings?  I love it when I see a product advertised with x,y, and z
  3663. features and they turn out to be the same features I've been using from
  3664. shareware sources for a fraction of the cost.
  3665. --Luis Muench
  3666.  
  3667. On Mon, 11 Apr 1994, Brian V. Hughes wrote:
  3668.  
  3669. > --Luis Muench wrote:
  3670. > >
  3671. > >Sorry 'bout the Subject line.  New to this Unix thang, but I love this
  3672. > >PINE mail!!  Anyways, is there a FAQ for this group (newbie here too)? I
  3673. > >read Info-Mac regularly, and have copped some of the AppleEvents progs and
  3674. > >like the power they concede!  Is there a starter kit for Scripting that
  3675. > >wont put me in the red (a.k.a. Userland's Frontier)?
  3676. >
  3677. >     If you are looking for a real scripting starter's kit, there are a
  3678. > couple of options for you. First of all you can buy the AppleScript
  3679. > Scripter's Kit from Apple (costs $144.95 from MacConnection). It comes
  3680. > with a really good set of manuals, including a pretty good Getting
  3681. > Started with AppleScript guide. The other choice is to buy one of the
  3682. > AppleScript books: Tao of AppleScript or Complete AppleScript Handbook.
  3683. > Both of these are supposed to be good for the novice scripter. If you
  3684. > have any kind of programming background, especially something like
  3685. > Hypercard, picking up AppleScript is pretty easy.
  3686. >
  3687. > -Hades
  3688. =========================================================================
  3689. Date:         Tue, 12 Apr 1994 06:54:00 PDT
  3690. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3691. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3692. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  3693. Subject:      Re: osax returning result & error?
  3694.  
  3695. >I'm trying to write a few osaxen, and have come up with kind of a problem.
  3696. >The osaxen in question are for DAM/DAL, and one of them has the potential
  3697. >to return real data, as well as an error code (DBGetQueryResults). The
  3698. >function itself returns an error if there's not enough memory for the whole
  3699. >result, but also should return the results that were retrieved.
  3700. >
  3701. >Right now, I'm returning the results of the query in the direct object,
  3702. >with the error code being stuffed into the keyErrorNumber parameter. Is
  3703. >this kosher? Is there some other way to do this? I suppose that DBState
  3704. >should return the fact that data is waiting, but as the DAL server is far
  3705. >away (I go about once or twice a week), I can't test this for sure.
  3706.  
  3707. Returning a result and an error code is just fine.  The AppleScript error
  3708. reporting system allows a AppleEvent (which is used to execute your OSAX)
  3709. to return both.  Scripts which receive this type of error need to look at
  3710. the "partial result" to see what data was returned in addition to the
  3711. error.
  3712.  
  3713. -Mark
  3714. =========================================================================
  3715. Date:         Tue, 12 Apr 1994 06:54:00 PDT
  3716. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3717. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3718. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  3719. Subject:      Re: Pause?
  3720.  
  3721. >Date:    Mon, 11 Apr 1994 18:51:16 -0500
  3722. >From:    Allan Marcus <allan_marcus@LANL.GOV>
  3723. >Subject: Pause?
  3724. >
  3725. >Anyone know how to pause a script during runtime?  Here's the situation:
  3726. >
  3727. >I am sendind an FTP fetch request to Anarchie.  The file is retreived fine
  3728. >via anarchie, and then anarchie launches stuffit expander to decompress.
  3729. >Unfortunatley, the applescript is considered done as soon as the download
  3730. >is complete, not when stuffit is done!  I figure I can do something like
  3731. >this:
  3732. >
  3733. >if (is application ruinning("Stuffit")) then
  3734. >        pause for a few seconds
  3735. >end if
  3736. >
  3737. >So, how do I pause with out eating cpu time?
  3738. >
  3739. >Any other ideas?
  3740. >
  3741. >thanks,
  3742. >
  3743. >Allan
  3744.  
  3745. How about a different approach.  Write a second script which Anarchie can
  3746. call instead of StuffIt.  This script could then call StuffIt, and then
  3747. carry on processing once the file has been processed.
  3748.  
  3749. -Mark
  3750. =========================================================================
  3751. Date:         Tue, 12 Apr 1994 10:28:17 -0400
  3752. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3753. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3754. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  3755. Subject:      Re: Anarchie/AppleScript/PPC Question
  3756.  
  3757. >Problem is this:  when I try to run the "Get Files" script to use Anarchie
  3758. >to download files from an info-mac mirror, the machine bombs with a message
  3759. >to the effect of "Floating point coprocessor not installed."
  3760. >
  3761. >I understand that, in emulation, the PowerMacs do not provide an FPU.  Does
  3762. >one of these programs require it, or is it simply an incompatibility
  3763. >between these programs and the emulator?
  3764.  
  3765. I don't know.  I can't see why Anarchie would be using floating point, and
  3766. if it were I can't see why it would be going directly to the coprocessor.
  3767. However, I've had absolutely no success with Anarchie's scripts and I'm
  3768. using a Quadra 700 and AppleScript 1.1.  I think that Anarchie's scripts
  3769. are incompatible with AS 1.1, but I'm just guessing.  Anyone else had
  3770. problems with these scripts?  They use low level AppleEvents, and it just
  3771. looks like gibberish to me.  I presume this is the root of the problem.
  3772.  
  3773. Steve
  3774.  
  3775. ---------------------
  3776.  jonke@gsfc.nasa.gov
  3777. ---------------------
  3778. =========================================================================
  3779. Date:         Tue, 12 Apr 1994 10:48:09 -0400
  3780. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3781. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3782. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  3783. Subject:      Re: Shareware scripting environments...
  3784. In-Reply-To:  <no.id> from "Luis Muench" at Apr 12, 94 09:48:52 am
  3785.  
  3786. --Luis Muench wrote:
  3787. >
  3788. >Thanx for your reply, Hades...
  3789.  
  3790.     No problem.
  3791.  
  3792. >        For the benefit of those that may be lurking or would feel
  3793. >embarased to ask a stupid question:  Are there any scripting environments
  3794. >that are of a Shareware nature?!  Anything comprable to commercial
  3795. >offerings?
  3796.  
  3797.     Currently there aren't any. The closest is a scripting environment
  3798. for MPW written by Jon Pugh. I don't think Jon charges anything for his
  3799. scripting set-up, but when you have to pay upwards of $1000 for MPW...
  3800.  
  3801. >I love it when I see a product advertised with x,y, and z features and
  3802. >they turn out to be the same features I've been using from shareware
  3803. >sources for a fraction of the cost.
  3804.  
  3805.     Amen.
  3806.  
  3807. -Hades
  3808. =========================================================================
  3809. Date:         Tue, 12 Apr 1994 08:13:01 -0700
  3810. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3811. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3812. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  3813. Subject:      Re: Anarchie/AppleScript/PPC Question
  3814.  
  3815. >Please forgive me if this has been asked before or if this is not the
  3816. >appropriate forum, but I am new to both Anarchie and this list.
  3817. >
  3818. >Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  3819. >
  3820. >Problem is this:  when I try to run the "Get Files" script to use Anarchie
  3821. >to download files from an info-mac mirror, the machine bombs with a message
  3822. >to the effect of "Floating point coprocessor not installed."
  3823. >
  3824. >I understand that, in emulation, the PowerMacs do not provide an FPU.  Does
  3825. >one of these programs require it, or is it simply an incompatibility
  3826. >between these programs and the emulator?
  3827.  
  3828. I run Anarchie 1.1.3 on my Power Mac 8100/80.  I also run AppleScript 1.1,
  3829. although I use Frontier to script Anarchie.  I have no problems running
  3830. Anarchie on my 8100.  And the two trials I did make using AppleScript went
  3831. fine (although it wasn't the script you mention).
  3832.  
  3833. --John
  3834.  
  3835. --
  3836. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  3837. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  3838. =========================================================================
  3839. Date:         Tue, 12 Apr 1994 08:31:23 -0700
  3840. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3841. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3842. From:         David Ray <daver@NETCOM.COM>
  3843. Subject:      Re: pause
  3844.  
  3845. >an easier way to pause a script is in this format:
  3846. >
  3847. >repeat until <condition>
  3848. >
  3849. >end repeat
  3850. >
  3851. >in your case, you would want to put "(is application running(stuffit)) is
  3852. >false"
  3853. >in the place of <condition>. this will make your script do nothing until
  3854. >stuffit is not running.
  3855.  
  3856. This will work, but try to do something processor-intensive during the pause
  3857. and it won't get done. This sucks too much CPU power. Perhaps the degree
  3858. to which it sucks CPU time is related to which machine is used. I have a
  3859. Powerbook 100, and this is a significant issue. Perhaps on a Quadra or PPC
  3860. this is not such a big issue.
  3861.  
  3862. An example is downloading a file with ZTerm using an Applet (stay-open
  3863. Applescript App) in the background. The transfer rate is inversely proportional
  3864. to the CPU time being sucked by the Applet. Other examples of processor-
  3865. intensive tasks would be stuffing a large file, transfering a file with
  3866. Anarchie, watching a Quicktime movie, etc..
  3867.  
  3868. The on idle..end idle puts the least burden on the CPU.
  3869.  
  3870. -Dave
  3871.  
  3872. ------------------------------------------------------------------------------
  3873. David Ray                Dream Designs          Music Composition
  3874. daver@netcom.com         PO Box 5631            Interactive Multimedia
  3875. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  3876. =========================================================================
  3877. Date:         Tue, 12 Apr 1994 10:55:29 -0500
  3878. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3879. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3880. From:         Fred Terry <pfterry@LKS.CSI.COM>
  3881. Subject:      Re: fw:Menu Events, Menu Grabber,
  3882.               Help on Wheels at gaea.kgs.ukans.edu
  3883. In-Reply-To:  Your message of "Tue, 12 Apr 94 01:20:00 EDT"
  3884.  
  3885. Hi everyone,
  3886.  
  3887. >Menu Events, Menu Grabber, Help on Wheels at gaea.kgs.ukans.edu
  3888. >
  3889. >I have uploaded the newest versions of these three programs to
  3890. >ftp://gaea.kgs.ukans.edu/incoming.  Hopefully they will show up
  3891. >somewhere in the applescript directory shortly.
  3892.  
  3893. You'll now find these in
  3894.  
  3895. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.1.sit.Hqx
  3896. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.1.sit.Hqx
  3897. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  3898. ftp://gaea.kgs.ukans.edu/applescript/addons/Help_on_Wheels_1.1.sit.Hqx
  3899.  
  3900. {How bout that, John :-}
  3901.  
  3902. pf
  3903. =========================================================================
  3904. Date:         Tue, 12 Apr 1994 14:58:35 -0500
  3905. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3906. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3907. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  3908. Subject:      None
  3909.  
  3910. REV MACSCRIPT BY userid
  3911. =========================================================================
  3912. Date:         Tue, 12 Apr 1994 12:32:40 PDT
  3913. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3914. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3915. From:         Michael Compton <compton@PTOLEMY.ARC.NASA.GOV>
  3916. Subject:      frontmost droplets?
  3917.  
  3918. Hi all,
  3919. I'm just beginning to play with FrontMost and have found that adding an
  3920. "on open" handler to a Project Script may not always make the a subsequent
  3921. saved app "droppable". Sometimes it does and sometimes it doesn't (although
  3922. the icon will have the little down-arrow).
  3923.  
  3924. Can anyone comment on whether it's a known problem or if I'm doing something
  3925. wrong?
  3926. Thanks,
  3927. -Michael Compton
  3928.  compton@ptolemy.arc.nasa.gov
  3929. =========================================================================
  3930. Date:         Tue, 12 Apr 1994 15:37:22 -0500
  3931. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3932. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3933. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  3934. Subject:      Re: Menu Events, Menu Grabber,
  3935.               Help on Wheels at gaea.kgs.ukans.edu
  3936.  
  3937. +Menu_Grabber_1.1.1.sit.Hqx
  3938. +  Menu Grabber -- application supporting remote control via menus
  3939. +  Menu Grabber Help -- Help on Wheels help file
  3940.  
  3941. Menu Grabber is way kewl. But iwas just able to restart my
  3942. colleagues mac, without he coming to know about. Aren't we
  3943. talkin a major security hole here? I know I know, u can turn
  3944. off your filesharin/linkin...but thats not what i am lookin at...
  3945.  
  3946. Finder AE's like restart/shutdown should be disabled...
  3947. Just my 187.348 roubles (approx US$0.02)
  3948. __ __
  3949. Marilyn Monroe
  3950. Bring Back the Goddess Inc.
  3951.  
  3952. Don't tell me later that folks in Temple think the same way
  3953. folks in Heaven do.
  3954. =========================================================================
  3955. Date:         Tue, 12 Apr 1994 16:20:15 -0400
  3956. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3957. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3958. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  3959. Subject:      Re: Menu Events, Menu Grabber,
  3960.               Help on Wheels at gaea.kgs.ukans.edu
  3961. In-Reply-To:  <9404121941.AA01285@fiu.edu>
  3962.  
  3963. Norma Jean, your money not good here! BTW, AppleEvents should *NOT* be
  3964. disabled in the Finder ==> BUT you should have the _option_ to have YOUR
  3965. finder accept/not AE's.
  3966. Just my $60.00 pesos worth, y que viva Mexico...
  3967.  
  3968. On Tue, 12 Apr 1994, The Goddess Lives wrote:
  3969.  
  3970. > +Menu_Grabber_1.1.1.sit.Hqx
  3971. > +  Menu Grabber -- application supporting remote control via menus
  3972. > +  Menu Grabber Help -- Help on Wheels help file
  3973. >
  3974. > Menu Grabber is way kewl. But iwas just able to restart my
  3975. > colleagues mac, without he coming to know about. Aren't we
  3976. > talkin a major security hole here? I know I know, u can turn
  3977. > off your filesharin/linkin...but thats not what i am lookin at...
  3978. >
  3979. > Finder AE's like restart/shutdown should be disabled...
  3980. > Just my 187.348 roubles (approx US$0.02)
  3981. > __ __
  3982. > Marilyn Monroe
  3983. > Bring Back the Goddess Inc.
  3984. >
  3985. > Don't tell me later that folks in Temple think the same way
  3986. > folks in Heaven do.
  3987. =========================================================================
  3988. Date:         Tue, 12 Apr 1994 19:15:42 -0500
  3989. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3990. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  3991. From:         Manuel Veloso <veloso@NETCOM.COM>
  3992. Subject:      Class of parameter '****'
  3993.  
  3994. yet another question...
  3995.  
  3996. I have an osax that will need to accept a parameter of any class
  3997. (typeAnyType). There doesn't seem to be a way, though, to get this type
  3998. within an osax. Another way would be to pass the type of the object as
  3999. another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
  4000. theItem), but it seems kind of like a kludge. Is there some supported way
  4001. to do this?
  4002.  
  4003. Manuel
  4004. =========================================================================
  4005. Date:         Tue, 12 Apr 1994 21:21:59 -0700
  4006. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4007. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4008. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  4009. Subject:      Re: Class of parameter '****'
  4010.  
  4011. >yet another question...
  4012. >
  4013. >I have an osax that will need to accept a parameter of any class
  4014. >(typeAnyType). There doesn't seem to be a way, though, to get this type
  4015. >within an osax. Another way would be to pass the type of the object as
  4016. >another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
  4017. >theItem), but it seems kind of like a kludge. Is there some supported way
  4018. >to do this?
  4019.  
  4020. There are a couple of ways to extract a parameter of unknown type from an
  4021. Apple event.  [Remember, your osax is just an event handler routine.]  If
  4022. you ask for the parameter using AEGetParamDesc (), specifying a desired
  4023. type of typeWildCard (aka '****'), you get the parameter as it is in the
  4024. event...no coercion.  You can then look at the descriptorType field in the
  4025. descriptor you got back, and decide what to do.
  4026.  
  4027. An alternative is to ask for the parameter with AEGetParamPtr (), again
  4028. specifying typeWildCard, but specifying a maximum length of zero.  You'll
  4029. get an error (except in the degenerate case of a 'null' parameter, or a
  4030. true or false of the data-less sort), but you'll also receive the actual
  4031. size and actual type, and can then decide what to do.
  4032.  
  4033. If you want the parameter no matter what it is, the former method may make
  4034. more sense.  If you only will accept certain types, and reject others, and
  4035. the types you will accept can easily be gotten using AEGetParamPtr (),
  4036. possibly with coercion, you can save some memory management overhead by
  4037. using the latter method.
  4038.  
  4039. There are other options, too, depending upon what your osax considers
  4040. "legal" input...if you're willing to accept any numeric which can be
  4041. coerced to a long, for instance, just ask for a long.  That will even work
  4042. if the caller has passed the string "1234".
  4043.  
  4044.    --John
  4045.  
  4046. --
  4047. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  4048. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  4049. =========================================================================
  4050. Date:         Tue, 12 Apr 1994 23:37:17 -0700
  4051. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4052. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4053. From:         Jon Pugh <jonpugh@NETCOM.COM>
  4054. Subject:      Re: Stuff
  4055.  
  4056. >>        For the benefit of those that may be lurking or would feel
  4057. >>embarased to ask a stupid question:  Are there any scripting environments
  4058. >>that are of a Shareware nature?!  Anything comprable to commercial
  4059. >>offerings?
  4060. >
  4061. >    Currently there aren't any. The closest is a scripting environment
  4062. >for MPW written by Jon Pugh. I don't think Jon charges anything for his
  4063. >scripting set-up, but when you have to pay upwards of $1000 for MPW...
  4064.  
  4065. Unfortunately, my RunScript MPW tool is simply a compiler for OSA
  4066. languages.  It does nothing without AppleScript (which implements the OSA
  4067. _and_ an OSA client). It does provide some features above the Script
  4068. Editor, but doesn't have some that it does.
  4069.  
  4070. There is an OSA language based on the unix tcl, but it only does file stuff
  4071. and it STILL requires AppleScript to implement the OSA.  Given the work
  4072. involved in writing AppleScript, it will quite some time before anyone
  4073. implements a shareware version of a decent scripting language that uses
  4074. aetes and all.
  4075.  
  4076.  
  4077. >I have an osax that will need to accept a parameter of any class
  4078. >(typeAnyType). There doesn't seem to be a way, though, to get this type
  4079. >within an osax. Another way would be to pass the type of the object as
  4080. >another parameter (ie: DAMSendItem dataItem theItem itemClass (class of
  4081. >theItem), but it seems kind of like a kludge. Is there some supported way
  4082. >to do this?
  4083.  
  4084. Here's one:
  4085.  
  4086. AEGetParamPtr(&theAppleEvent,
  4087.                 theAEKeyword,
  4088.                 desiredType,    <-- the type you want (or typeWildCard)
  4089.                 &typeCode,      <-- the actual type before coercion
  4090.                 dataPtr,
  4091.                 maximumSize,    <-- use 0 here to skip the data
  4092.                 &actualSize);
  4093.  
  4094. Here's another:
  4095.  
  4096. AESizeOfParam(&theAEEvent,
  4097.                 theAEKeyword,
  4098.                 &typeCode,      <-- the type of the parameter
  4099.                 &dataSize);
  4100.  
  4101. Jon
  4102. =========================================================================
  4103. Date:         Wed, 13 Apr 1994 14:51:43 +0800
  4104. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4105. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4106. From:         Peter N Lewis <peter.lewis@INFO.CURTIN.EDU.AU>
  4107. Subject:      Re: Anarchie Question
  4108.  
  4109. [Note: I don't read this list (it's too much to wade thru and I'm busy
  4110. working on a dozen projects), but I have very efficient front end
  4111. processors for the list so I'll try to respond to any queries about
  4112. Anarchie, though you might be better to cc me when posting such queries]
  4113.  
  4114. >Setup is this:  Anarchie 1.1.3, AppleScript 1.1, and a PowerMac 7100/66.
  4115.  
  4116. I've tested Anarchie briefly on the PowerMacs, and it seems to work fine,
  4117. though I didn't try out the AppleScripts.  Anarchie does not use floating
  4118. point anywhere.
  4119.  
  4120. >I don't know.  I can't see why Anarchie would be using floating point, and
  4121. >if it were I can't see why it would be going directly to the coprocessor.
  4122. >However, I've had absolutely no success with Anarchie's scripts and I'm
  4123. >using a Quadra 700 and AppleScript 1.1.
  4124.  
  4125. The scripts distributed with Anarchie are in 1.1 format and should work ok.
  4126. I can mail anyone the scripts in text format if they're interested.  The
  4127. quit event had a problem (it was in the wrong suite), and I think the
  4128. cut/copy/etc events are also in the wrong suite.
  4129.  
  4130. In any event, Anarchie scripting is pretty trivial, you should be able to
  4131. write your own from scratch or by refering to the docs file fairly easily.
  4132.  
  4133. tell application "Anarchie"
  4134.   with timeout of 5 * 60 seconds
  4135.     find "dehqx" server "archie.internic.net" matches 20 with window
  4136.     fetch file "HD:black-cat-startup.hqx" host "sumex-aim.stanford.edu"
  4137. path "/info-mac/grf/black-cat-startup.hqx"
  4138.     list file "HD:listing" host "sumex-aim.stanford.edu" path "/info-mac"
  4139.     store file "HD:file" host "sumex-aim.stanford.edu" path "/incoming"
  4140.  
  4141.     fetch url "sumex-aim.stanford.edu:/info-mac/grf/black-cat-startup.hqx"
  4142.  
  4143.   end timeout
  4144. end tell
  4145.  
  4146. Enjoy,
  4147.    Peter.
  4148.  
  4149. _______________________________________________________________________
  4150. Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055
  4151. =========================================================================
  4152. Date:         Wed, 13 Apr 1994 00:35:00 -0400
  4153. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4154. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4155. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  4156. From:         ab026@FREENET.CARLETON.CA
  4157. Subject:      Re: Menu Events, Menu Grabber,
  4158.  
  4159. Marilyn Monroe wrote:
  4160.  
  4161. >+Menu_Grabber_1.1.1.sit.Hqx
  4162. >+  Menu Grabber -- application supporting remote control via menus
  4163. >+  Menu Grabber Help -- Help on Wheels help file
  4164. >
  4165. >Menu Grabber is way kewl. But iwas just able to restart my
  4166. >colleagues mac, without he coming to know about. Aren't we
  4167. >talkin a major security hole here? I know I know, u can turn
  4168. >off your filesharin/linkin...but thats not what i am lookin at...
  4169. >
  4170. >Finder AE's like restart/shutdown should be disabled...
  4171. >Just my 187.348 roubles (approx US$0.02)
  4172.  
  4173. Major hole!  There's a whole section in Menu Events Help that talks
  4174. about this issue.  (Just to clarify, Menu Events and Menu Grabber don't
  4175. use Finder AE's like 'FNDR'/'rest', but you can tell them to select a
  4176. menu item in Finder called "Restart".)
  4177.  
  4178. If you have Menu Events installed, here's how to protect yourself
  4179. against Marilyn and her kind:
  4180. 1.  Turn off Program Linking in Sharing Setup, so that Menu Events and
  4181.     Menu Grabber will only work locally; or
  4182. 2.  Deny guests the privilege of linking to programs on your Mac; or
  4183. 3.  Use a particular application's Sharing dialog to turn off remote
  4184.     program linking (does this work on 7.1.2's Finder?); or
  4185. 4.  Lock the Menu Events extension file (startup icon will reflect this
  4186.     change), so that only applications running in kAEInteractWithAll
  4187.     mode will accept a Select Menu Item event from a remote sender.
  4188.     I doubt there are many non-scriptable applications which choose to
  4189.     run in this mode, or which let you select this mode through GUI.
  4190.     kAEInteractWithLocal is the default, and Menu Events cleverly
  4191.     overrides that setting if you don't lock it - hence the hole!
  4192.  
  4193. Happy grabbing,
  4194. Ross
  4195.  
  4196. --
  4197. Ross Brown - AWOL Software Productions
  4198. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  4199. publisher of AWOL Utilities - "the best deal in freeware!"
  4200. ab026@freenet.carleton.ca
  4201. =========================================================================
  4202. Date:         Wed, 13 Apr 1994 08:54:19 EDT
  4203. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4204. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4205. From:         William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
  4206. Subject:      ARA
  4207.  
  4208. ok, does anyone know how to send an event to ARA that tells it to answer
  4209. the phone or not to answer the phone.  I found a raw event called answ using
  4210. AETracker but it only seemed to find it once and I can't seem to duplicate it.
  4211.  
  4212. I know that ARA does not officially recognize apple events but if there is
  4213. a way...
  4214.  
  4215. I am currently using Quickkeys to accomplish my goals but I am a purest...
  4216.  
  4217. Bill
  4218. =========================================================================
  4219. Date:         Wed, 13 Apr 1994 08:56:12 EDT
  4220. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4221. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4222. From:         William Murphy <wmurphy@CBRC-A12.MGH.HARVARD.EDU>
  4223. Subject:      oh yea, and the network cdev
  4224.  
  4225. I also want a way to use Apple events to change from local talk to ether
  4226. with out opening the network control panel...
  4227.  
  4228. Bill
  4229. =========================================================================
  4230. Date:         Wed, 13 Apr 1994 10:19:48 -0400
  4231. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4232. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4233. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  4234. Subject:      Re: Shareware scripting environments...
  4235.  
  4236. well, Tickle is sort of a scripting language. it includes 2 OSA scripting
  4237. languages, J-APL and TCL. i think it is at gaea as
  4238. "applescript/scriptableapps/tickle.hqx" or something like that.
  4239.  
  4240. --
  4241. My opinions are mine only and tentative, pending further data
  4242.                         Matthew Ahrens
  4243. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  4244. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  4245. =========================================================================
  4246. Date:         Wed, 13 Apr 1994 10:51:26 -0400
  4247. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4248. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4249. From:         David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
  4250. Subject:      Example Eudora Scripts
  4251.  
  4252. Greetings,
  4253.         I'm looking for AppleScript examples to control Eudora 1.4.2.  I
  4254. found a short example somewhere but it doesn't seem to work properly (I'm
  4255. using AS 1.0 with the various bits from The Tao...).  Does anyone have an
  4256. actual working script that does something like beep twelve times when
  4257. mailings from this list show up, or save TidBITS mailings in a folder with
  4258. an EasyView viewer?  My running Applet or Droplet, or watever it's called,
  4259. gets a notification event, but I can't seem to get the new message data
  4260. that Eudora is supposed to pass.    If you're too shy to post your
  4261. imperfect script please email.  Any help is appreciated.
  4262.  
  4263. --Dave
  4264. =========================================================================
  4265. Date:         Wed, 13 Apr 1994 11:27:05 -0400
  4266. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4267. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4268. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  4269. Subject:      Restarting remote mac
  4270.  
  4271. Is there any way to restart a remote mac (assuming you have all the proper
  4272. access privs) without having to deal with extensions that need a restart in
  4273. the first place?
  4274.         I have come across some pretty cool software that allows you to
  4275. either restart, shut down, or turn off/on filesharing remotely.  I use
  4276. these to leave my mac on at work on Friday, and if I so desire, I can ARA
  4277. from home and switch my mac off or do a restart.  But the caveat exists
  4278. that I must pre-install the extensions that would do this.  Would it be
  4279. possible to have some sort of script that you could launch on a remote mac
  4280. and it would send a local restart command, thus avoiding the above caveat?
  4281.  
  4282. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4283. <<<<<<Reality is anything that cannot be undone or avoided
  4284. >>>>>>Luis Muench -- muench@solix.fiu.edu
  4285. =========================================================================
  4286. Date:         Wed, 13 Apr 1994 11:32:08 -0600
  4287. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4288. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4289. From:         K J Fox <kjfox@MKE.AB.COM>
  4290. Subject:      FaceSpan - FrontMost
  4291.  
  4292. Pardon me if this question has been asked:
  4293.  
  4294. MacWeek indicates that FaceSpan is a newer version
  4295. of FrontMost.  How does one get it if I already own
  4296. FrontMost, and does it cure the memory leak spoken
  4297. of a few weeks ago?
  4298.  
  4299. Thanks!
  4300.  
  4301. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4302. Kenneth J. Fox
  4303. Rockwell Automation - Allen Bradley Co.
  4304. Milwaukee, WI (414)382-3287 Voice
  4305. kjfox@mke.ab.com
  4306. =========================================================================
  4307. Date:         Wed, 13 Apr 1994 12:40:39 -0400
  4308. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4309. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4310. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  4311. Subject:      Re: FaceSpan - FrontMost
  4312. In-Reply-To:  <no.id> from "K J Fox" at Apr 13, 94 11:32:08 am
  4313.  
  4314. --K J Fox wrote:
  4315. >
  4316. >MacWeek indicates that FaceSpan is a newer version of FrontMost.  How
  4317. >does one get it if I already own FrontMost, and does it cure the memory
  4318. >leak spoken of a few weeks ago?
  4319.  
  4320.     We won't know any of this until Software Designs Unlimited, the
  4321. makers of FaceSpan (Frontmost - note correct spelling), officially
  4322. release FaceSpan as a product. Currently, you can only get Frontmost,
  4323. and only when you buy either the AppleScript Scripter's Kit or the
  4324. AppleScript Developer's Toolkit.
  4325.  
  4326. -Hades
  4327. =========================================================================
  4328. Date:         Wed, 13 Apr 1994 12:18:21 -0800
  4329. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4330. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4331. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  4332. Subject:      Re: Restarting remote mac
  4333.  
  4334. >Is there any way to restart a remote mac (assuming you have all the proper
  4335. >access privs) without having to deal with extensions that need a restart in
  4336. >the first place?
  4337. >        I have come across some pretty cool software that allows you to
  4338. >either restart, shut down, or turn off/on filesharing remotely.  I use
  4339. >these to leave my mac on at work on Friday, and if I so desire, I can ARA
  4340. >from home and switch my mac off or do a restart.  But the caveat exists
  4341. >that I must pre-install the extensions that would do this.  Would it be
  4342. >possible to have some sort of script that you could launch on a remote mac
  4343. >and it would send a local restart command, thus avoiding the above caveat?
  4344. >
  4345. >++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4346. +
  4347. ><<<<<<Reality is anything that cannot be undone or avoided
  4348. >>>>>>>Luis Muench -- muench@solix.fiu.edu
  4349.  
  4350. As a shameless plug for a company I am involved with, There is a hardware
  4351. device called the PowerSwitch LT that can control power to a Mac and send
  4352. an ADB toggle via a LocalTalk connection. It is a network device
  4353. independent of the device whos power it controls. You can control it with
  4354. HyperCard XCMDs and it would be pretty easy to tell a HyperCard stack to
  4355. start or power off a remote Mac via a network connection and AppleScript.
  4356.  
  4357. They are:
  4358. Radiant@applelink.apple.com
  4359.  
  4360. The PowerSwitch LT is somewhere under $200 or so.
  4361.  
  4362. Kee Nethery
  4363.  
  4364. _________________________________________________________________
  4365. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  4366. =========================================================================
  4367. Date:         Wed, 13 Apr 1994 16:12:50 -0400
  4368. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4369. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4370. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  4371. Subject:      Re: Restarting remote mac
  4372.  
  4373. >The PowerSwitch LT is somewhere under $200 or so.
  4374. >
  4375. >Kee Nethery
  4376.  
  4377. Kee - is this related to that device that adds soft power-on power-off to
  4378. Macs without it?  If so, can you tell me something about that product? (I
  4379. thought it was a LOT cheaper then $200!)  Also, does it work with PowerMacs
  4380. now, and is your company planning a "fat binary" version so that it doesn't
  4381. slow down the PowerMacs (as recently reported in several magazines, non
  4382. "fat-binary" extensions on PowerMacs can cause SIGNIFICANT slowdowns -
  4383. about 20 to 30% for AfterDark alone!)
  4384.  
  4385. Steve
  4386.  
  4387. ---------------------
  4388.  jonke@gsfc.nasa.gov
  4389. ---------------------
  4390. =========================================================================
  4391. Date:         Wed, 13 Apr 1994 16:14:29 -0400
  4392. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4393. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4394. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  4395. Subject:      Re: Restarting remote mac
  4396.  
  4397. Oops - sorry about that folks.  I had intended to send that question about
  4398. the PowerKey directly to Kee.  Sorry about sending it to the world....
  4399.  
  4400. Steve
  4401.  
  4402. ---------------------
  4403.  jonke@gsfc.nasa.gov
  4404. ---------------------
  4405. =========================================================================
  4406. Date:         Wed, 13 Apr 1994 16:57:00 EDT
  4407. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4408. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4409. From:         "William J. Jamison" <jami1@AOL.COM>
  4410. Subject:      Re: Restarting remote mac
  4411.  
  4412. Another shameless plug. Farallon will love me.
  4413. Timbuktu Remote in conjunction with their 9600 baud V.32 modem (a package
  4414. deal)comes with a modem cord that has an extra little pigtailed  cord on the
  4415. mini-din end that plugs into the ADB port (if you have a spare). This enables
  4416. you to call in to _some_ sleeping Macs (no longer works on my AV, for one
  4417. thing I gave up my Farallon modem in favor of the GeoPort, not much sense in
  4418. tying up 2 modems) and wake them up. If you could just get hold of the
  4419. cord...? Maybe.
  4420. =========================================================================
  4421. Date:         Wed, 13 Apr 1994 17:51:00 -0400
  4422. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4423. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4424. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  4425. From:         ab026@FREENET.CARLETON.CA
  4426. Subject:      Re: Restarting remote mac
  4427.  
  4428. >Is there any way to restart a remote mac (assuming you have all the proper
  4429. >access privs) without having to deal with extensions that need a restart in
  4430. >the first place?
  4431. >        I have come across some pretty cool software that allows you to
  4432. >either restart, shut down, or turn off/on filesharing remotely.  I use
  4433. >these to leave my mac on at work on Friday, and if I so desire, I can ARA
  4434. >from home and switch my mac off or do a restart.  But the caveat exists
  4435. >that I must pre-install the extensions that would do this.  Would it be
  4436. >possible to have some sort of script that you could launch on a remote mac
  4437. >and it would send a local restart command, thus avoiding the above caveat?
  4438.  
  4439. This works for me in System 7.1, even though the Finder's not scriptable yet:
  4440.  
  4441. tell application "Finder" to <<event FNDRrest>> -- substitute guillemots for <>
  4442.  
  4443. Save that script as an application, then use a Finder event to launch this
  4444. application from wherever you're sitting.  (Open Selection can be run from
  4445. a remote Mac, but Restart can't.)  If any application puts up a prompt dialog
  4446. when told to quit, you're stuck, unfortunately, though you could try using
  4447. the Autotype 'osax' to pump a stream of "Enter" keystrokes at these dialogs.
  4448.  
  4449. Ross Brown - AWOL Software Productions
  4450. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  4451. publisher of AWOL Utilities - "the best deal in freeware!"
  4452. ab026@freenet.carleton.ca
  4453. =========================================================================
  4454. Date:         Wed, 13 Apr 1994 18:25:09 -0400
  4455. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4456. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4457. From:         Gustavo Benzecri <gbenze@CONICIT.VE>
  4458. Subject:      Re: Example Eudora Scripts
  4459.  
  4460. >Greetings,
  4461. >        I'm looking for AppleScript examples to control Eudora 1.4.2.  I
  4462. >found a short example somewhere but it doesn't seem to work properly (I'm
  4463. >using AS 1.0 with the various bits from The Tao...).  Does anyone have an
  4464. >actual working script that does something like beep twelve times when
  4465. >mailings from this list show up, or save TidBITS mailings in a folder with
  4466. >an EasyView viewer?  My running Applet or Droplet, or watever it's called,
  4467. >gets a notification event, but I can't seem to get the new message data
  4468. >that Eudora is supposed to pass.    If you're too shy to post your
  4469. >imperfect script please email.  Any help is appreciated.
  4470. >
  4471. >--Dave
  4472.  
  4473. The following is a short script I wrote some days ago that helps me to
  4474. classify the incoming mail into selected Eudora's mailboxes according to a
  4475. pattern in the sender field:
  4476.  
  4477. -------- script begins here --------
  4478. set fieldLabel to "sender"
  4479. set rules to {{"MACSCRPT", "AppleScript"}, {"4d@", "4th-Dimension"}}
  4480. tell application "Eudora"
  4481.  activate
  4482.  repeat with m from (count message of mailbox "in" of mail folder "") to 1 by 
  4483. -1
  4484.   set theMessage to (a reference to message m of mailbox "in" of mail folder 
  4485. "")
  4486.   try
  4487.    set fieldSender to field fieldLabel of theMessage
  4488.    set proceed to true
  4489.   on error
  4490.    set proceed to false
  4491.   end try
  4492.   if proceed then
  4493.    repeat with theRule in rules
  4494.     if fieldSender contains item 1 of theRule then
  4495.      try
  4496.       set mailFolder to (a reference to mail folder (item 3 of theRule))
  4497.      on error
  4498.       set mailFolder to (a reference to mail folder "")
  4499.      end try
  4500.      move theMessage InsertHere end of mailbox (item 2 of theRule) of 
  4501. mailFolder
  4502.      exit repeat
  4503.     end if
  4504.    end repeat
  4505.   end if
  4506.  end repeat
  4507. end tell
  4508. -------- script ends here --------
  4509.  
  4510. The "rules" field guides the script to what to do with the incoming mail.
  4511. In the example above all mail with "MACSCRPT" anywhere in the sender field
  4512. goes to the "AppleScript" mailbox and all the mail with "4d@" goes to the
  4513. "4th-Dimension" mailbox. You can define a third field if the target mailbox
  4514. is inside a mail folder.
  4515.  
  4516. I think the script could be modified to store text files such as the
  4517. TidBITS mailings simply replacing the "move" command with a "save" command
  4518. and adding a folder path string to the rules.
  4519.  
  4520. Hope this helps,
  4521.  
  4522. -- Gustavo
  4523. =========================================================================
  4524. Date:         Wed, 13 Apr 1994 16:30:34 -0600
  4525. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4526. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4527. From:         Mel Walker <mwalker@NETCOM.COM>
  4528. Subject:      Finding the sender of an event from AppleScript
  4529.  
  4530. Given the following script, how do I find out the address of the sender of
  4531. the event?
  4532.  
  4533. on <<event testdisp>>(x)
  4534.     return (display dialog x)
  4535. end <<event testdisp>>
  4536.  
  4537. I want to be able to send another event back at the sender. Can anyone help
  4538. me do this?
  4539.  
  4540. BTW, are these kind of things documented in the AppleScript kit from APDA?
  4541. I only have the runtime.
  4542.  
  4543. Thanks,
  4544. --Mel Walker
  4545.  
  4546. --
  4547. Mel Walker                                           mwalker@netcom.com
  4548. "Actually, I just like to say the word 'Smock.' Smock Smock Smock Smock
  4549. Smock Smock Smock!" - Hobbes
  4550. =========================================================================
  4551. Date:         Thu, 14 Apr 1994 09:46:36 +0730
  4552. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4553. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4554. From:         Tan Jin Ho <jinho@NCB.GOV.SG>
  4555. Subject:      Re: Example Eudora Scripts
  4556.  
  4557. Here's something you might find helpful. It's from a kind soul on the net.
  4558.  
  4559.  
  4560. -----------------------
  4561. --this script shows how to get Eudora to send mail or move messages around.
  4562. --
  4563. tell application "Eudora"
  4564.         make new Message at end of Mailbox "Out" of Mail Folder ""
  4565.         set Field "Subject" of Message 1 of Mailbox "out" of Mail Folder ""
  4566. to "This is a dead parrot."
  4567.         --you also might want these:
  4568.  
  4569.         set Field "To" of Message 1 of Mailbox "out" of Mail Folder "" to
  4570. "<destination address>"
  4571.         set Field "Cc" of Message 1 of Mailbox "out" of Mail Folder "" to
  4572. "<carbon copy address>"
  4573.         set Field "Bcc" of Message 1 of Mailbox "out" of Mail Folder "" to
  4574. "<blind carbon copy address>"
  4575.         set Field "" of Message 1 of Mailbox "out" of Mail Folder "" to
  4576. "<Body of message>"
  4577.  
  4578.         get Field "" of Message -2 of Mailbox "in" of Mail Folder ""
  4579.         get Field "Subject" of Message -2 of Mailbox "in" of Mail Folder ""
  4580.  
  4581. end tell
  4582.  
  4583. (* Move every message in the "In" box that has a title that contains "Re:"
  4584. to a mailbox called "stupid" in the top level mail folder *)
  4585. tell application "Eudora"
  4586.         copy (count Message of Mailbox "in" of Mail Folder "") to maxcount
  4587.         copy maxcount to messNum
  4588.         repeat with i from 1 to maxcount
  4589.                 if Field "Subject" of Message messNum of Mailbox "in" of
  4590. Mail Folder "" contains "Re:" then
  4591.                         move Message messNum of Mailbox "in" of Mail Folder
  4592. "" to end of Mailbox "stupid" of Mail Folder ""
  4593.                 end if
  4594.                 set messNum to messNum - 1
  4595.         end repeat
  4596. end tell
  4597.  
  4598. --------------------------
  4599. -- This script is a "framework" for registering an application with Eudora
  4600. -- that will receive events from Eudora and process incoming mail.
  4601.  
  4602. on <<event CSOmeNot>> msgList
  4603.         copy (count of items in msgList) to msgNum
  4604.         repeat with i from 1 to msgNum
  4605.            tell application "Eudora"
  4606.                  if field "Subject" of (item i of msgList as message)
  4607. contains "test" then
  4608.                          beep -- here's where you process the message
  4609.                  end if
  4610.            end tell
  4611.         end repeat
  4612. end <<event CSOmeNot>>
  4613.  
  4614. on quit
  4615.         tell application "Eudora"
  4616.                 please notify alias "Hard_Disk:AppleScript:notify.script"
  4617. without Notify
  4618.         end tell
  4619.         continue quit
  4620. end quit
  4621.  
  4622. tell application "Eudora"
  4623.         please notify alias "Hard_Disk:AppleScript:notify.script"
  4624. end tell
  4625. =========================================================================
  4626. Date:         Thu, 14 Apr 1994 00:11:22 -0500
  4627. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4628. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4629. From:         Manuel Veloso <veloso@NETCOM.COM>
  4630. Subject:      Re: Class of parameter '****'
  4631.  
  4632. >There are a couple of ways to extract a parameter of unknown type from an
  4633. >Apple event. [rest omitted]
  4634.  
  4635. Huh. I figured that by the time applescript got through with the data,
  4636. there wouldn't be any way to work backwards to its original type, the AE
  4637. calls notwithstanding.
  4638.  
  4639. I'm suprised that the type information is still present with the data...I
  4640. thought that when the data's converted to the generic type for the osax,
  4641. type info would be lost along the way. It's nice to know that the AE system
  4642. is robust in this sense. Since I need to get certain types, I'll be going
  4643. the AEGetParamPtr route (as I do with the rest of the parameters).
  4644.  
  4645. Thanks,
  4646.  
  4647. Manuel
  4648. =========================================================================
  4649. Date:         Thu, 14 Apr 1994 00:38:54 -0500
  4650. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4651. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4652. From:         Manuel Veloso <veloso@NETCOM.COM>
  4653. Subject:      Class of data object from wildcard (summary)
  4654.  
  4655. Hmmm. I'm starting to get my head around the relationship between the AE
  4656. manager and applescript. Lets see....
  4657.  
  4658. Any given data parameter that is passed to a scripting addition is first
  4659. targeted down to a specific apple-event to the addition. Then, the data is
  4660. stuffed into an apple-event descriptor that fits the data format specified
  4661. in the scripting addition's aete. During this time, no coercion of the data
  4662. takes place (unless the 'as xxxxx' syntax is used); the data is passed
  4663. as-is, with the actual type of the data being a part of the above
  4664. descriptor.
  4665.  
  4666. Then, the descriptor gets built into an appleevent that gets passed onto
  4667. the scripting addition. Since the data structure (not contents) has been
  4668. validated by AppleScript, it's sort of guaranteed that the data is at least
  4669. in the correct structure, and that the minimum number of required
  4670. parameters are present.
  4671.  
  4672. It is actually the addition that performs/requests coercions, when it pulls
  4673. the info out of the appleevent...the data may be in any form before the
  4674. coercion takes place, with the assumption being the data is convertible. So
  4675. if testaddition takes a long as a parameter, but is passed a string like
  4676. "15542", the text string "15542" is passed with its type as typeText.
  4677.  
  4678. So basically, that means that most/all of applescript's structures (lists,
  4679. records, etc) mirror the ones in IM-IAC, and that OSA scripting
  4680. environments are basically data validation/front-ends/editors for the
  4681. apple-event manager.
  4682.  
  4683. How far/near is this description to reality? And, is there some document or
  4684. something that bridges between OSA and the AppleEvent manager?
  4685.  
  4686. >>>        For the benefit of those that may be lurking or would feel
  4687. >
  4688. >Here's one:
  4689. >
  4690. >AEGetParamPtr(&theAppleEvent,
  4691. >                theAEKeyword,
  4692. >                desiredType,    <-- the type you want (or typeWildCard)
  4693. >                &typeCode,      <-- the actual type before coercion
  4694. >                dataPtr,
  4695. >                maximumSize,    <-- use 0 here to skip the data
  4696. >                &actualSize);
  4697. >
  4698. >Here's another:
  4699. >
  4700. >AESizeOfParam(&theAEEvent,
  4701. >                theAEKeyword,
  4702. >                &typeCode,      <-- the type of the parameter
  4703. >                &dataSize);
  4704. >
  4705. >Jon
  4706. =========================================================================
  4707. Date:         Thu, 14 Apr 1994 09:03:13 -0400
  4708. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4709. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4710. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  4711. Subject:      Finder files v. Finder aliases?
  4712.  
  4713. Can anybody tell me why the following piece of code:
  4714.  
  4715. set fd to open for access {file destinationFile}
  4716. set theText to read fd from 1 to -1 as text
  4717. close access fd
  4718. display dialog theText
  4719.  
  4720. works when destinationFile is a real file (in this case, created by
  4721. TeachText), but does not work when it is an alias to the same real file
  4722. (such as created by "Make Alias" from the File menu or by "symlink" in
  4723. MacPerl).  In the case when destinationFile is an alias, I get an "End of
  4724. file error".  Note that I get the same behavior when the first line reads:
  4725.  
  4726. set fd to open for access {alias destinationFile}
  4727.  
  4728. I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
  4729. Finder aliases were like Unix symbolic links.
  4730.  
  4731. BTW, some applications don't seem to mind these aliases:
  4732.  
  4733. tell application "Simple Player" to open {alias destinationFile}
  4734.  
  4735. works fine, but
  4736.  
  4737. tell application "Sound Machine" to open {alias destinationFile}
  4738.  
  4739. doesn't.  In the first case, SimplePlayer opens up the movie file as you
  4740. would expect.  In the second case, SoundMachine shows in its control panel
  4741. that the file has been opened, but will not play it automatically even if
  4742. "play on open" is specified.  It will play it if you mouse on the control
  4743. panel.  Again, if destinationFile is a real file, everything works.  If it
  4744. is a Finder alias, it doesn't.  Any clues?
  4745.  
  4746. Thanks,
  4747.                                 -Steve.
  4748.  
  4749. +--------------------------------------------------------------+
  4750. | Steven L. Rohall                                             |
  4751. |                            ________ _        ______  ______  |
  4752. | 55 Walkers Brook Drive        /    / \      /     / /     /  |
  4753. | Reading, MA 01867-3297       /    /___\    /______ /         |
  4754. | Tel: (617)942-2000          /    /     \         //          |
  4755. | Fax: (617)942-7100         /    /       \/______//______/    |
  4756. | slrohall@tasc.com                                            |
  4757. | (MIME-conformant mail welcome.)                              |
  4758. +--------------------------------------------------------------+
  4759. =========================================================================
  4760. Date:         Thu, 14 Apr 1994 10:01:44 -0500
  4761. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4762. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4763. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  4764. Subject:      MoveFilestoTrash
  4765.  
  4766. Is anyone having problems with this osax?  When I use it to try and move a
  4767. folder on a network-mounted volume to the trash, I get a dialog stating
  4768. that the folder already exists there and do I want to replace the existing
  4769. one.  This happens even when the trash on both machines is empty.  Any
  4770. ideas?  I need to postpone actually deleting the folder, so deletefiles()
  4771. isn't an option.
  4772.  
  4773. King Rhoton                                             king@acpub.duke.edu
  4774. =========================================================================
  4775. Date:         Thu, 14 Apr 1994 10:05:27 -0500
  4776. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4777. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4778. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  4779. Subject:      MoveFilestoTrash, cont...
  4780.  
  4781. >Is anyone having problems with this osax?  When I use it to try and move a
  4782. >folder on a network-mounted volume to the trash, I get a dialog stating that
  4783. >the folder already exists there and do I want to replace the existing one.
  4784.  
  4785. Sorry, I misspoke.  Actually, what the dialog says is that the folder
  4786. already exists: OK, cancel.  If I choose cancel, nothing happens to the
  4787. folder, and if I choose OK, the folder gets deleted (no fat trash can, no
  4788. nothing).  Very frustrating.
  4789.  
  4790. King Rhoton                                             king@acpub.duke.edu
  4791. =========================================================================
  4792. Date:         Thu, 14 Apr 1994 10:09:09 -0500
  4793. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4794. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4795. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  4796. Subject:      MoveFilestoTrash, cont 2...
  4797.  
  4798. >Is anyone having problems with this osax?
  4799.  
  4800. And, come to think of it, it's not an osax, it's part of the FinderLib
  4801. script.  Man, I hate tax time....
  4802.  
  4803. King Rhoton                                             king@acpub.duke.edu
  4804. =========================================================================
  4805. Date:         Thu, 14 Apr 1994 10:15:41 -0500
  4806. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4807. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4808. From:         David Myers <dcmyers@ACCESS.DIGEX.NET>
  4809. Subject:      Frontier price increased to $495???
  4810.  
  4811. The newest MacWeek has a comparison between UserLand Frontier and
  4812. AppleScript.  The review was balanced overall in my opinion, but one
  4813. item really caught me by surprise.  Apparently, UserLand has increased
  4814. the price to $495!  I'm glad I've already bought it, because I never
  4815. would have paid that much for it.  Putting aside questions of whether
  4816. it is "worth it" or not, I simply could not have afforded it.
  4817.  
  4818. Does anybody else agree with me that this will kill the market for the
  4819. product?  I have assumed all along that UserLand was targeting the
  4820. hobbyist/tinkerer rather than the corporate developer...
  4821.  
  4822.  
  4823. ____________________________________________________
  4824.  
  4825. David C. Myers
  4826. dcmyers@access.digex.net
  4827. =========================================================================
  4828. Date:         Thu, 14 Apr 1994 10:32:01 -0400
  4829. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4830. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4831. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  4832. Subject:      OSA Menu
  4833.  
  4834. I have a script that does an operation on the finder selection, and it runs
  4835. find from the script editor, but it would be a lot more useful if i could run
  4836. it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
  4837. it gives me an error of -1762. What does this mean, and how can i fix it?
  4838.  
  4839. also, what is the email address of Leonard Rosenthal, the author of OSA Menu?
  4840. (so that i can ask him this question also)
  4841.  
  4842. tia!!
  4843.  
  4844. --
  4845. My opinions are mine only and tentative, pending further data
  4846.                         Matthew Ahrens
  4847. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  4848. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  4849. =========================================================================
  4850. Date:         Thu, 14 Apr 1994 10:31:30 -0400
  4851. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4852. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4853. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  4854. Subject:      Re: Frontier price increased to $495???
  4855. In-Reply-To:  <9404141418.AA25407@fiu.edu>
  4856.  
  4857. Whoa, dude!  $495.00.  Sheesh!  I think its time someone (who can) should
  4858. create a "Bare-Bones" scripting environment for us po'folk on the net.  I
  4859. WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
  4860.  
  4861. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4862. <<<<<<Reality is anything that cannot be undone or avoided
  4863. >>>>>>Luis Muench -- muench@solix.fiu.edu
  4864.  
  4865.  
  4866. On Thu, 14 Apr 1994, David Myers wrote:
  4867.  
  4868. > The newest MacWeek has a comparison between UserLand Frontier and
  4869. > AppleScript.  The review was balanced overall in my opinion, but one
  4870. > item really caught me by surprise.  Apparently, UserLand has increased
  4871. > the price to $495!  I'm glad I've already bought it, because I never
  4872. > would have paid that much for it.  Putting aside questions of whether
  4873. > it is "worth it" or not, I simply could not have afforded it.
  4874. >
  4875. > Does anybody else agree with me that this will kill the market for the
  4876. > product?  I have assumed all along that UserLand was targeting the
  4877. > hobbyist/tinkerer rather than the corporate developer...
  4878. >
  4879. >
  4880. > ____________________________________________________
  4881. >
  4882. > David C. Myers
  4883. > dcmyers@access.digex.net
  4884. =========================================================================
  4885. Date:         Thu, 14 Apr 1994 10:50:17 -0400
  4886. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4887. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4888. From:         David Brown <dlb1@SEQUOIA.LLE.ROCHESTER.EDU>
  4889. Subject:      Re: Example Eudora Scripts
  4890.  
  4891. Thanks for all the help everyone.  I've downloaded the list archives to use
  4892. with  EasyView (lots of useful stuff) and your specific examples are very
  4893. helpful.  The one script fragment that does not work for me is the
  4894. following:
  4895.  
  4896. >on <<event CSOmeNot>> msgList
  4897. >        copy (count of items in msgList) to msgNum
  4898. >        repeat with i from 1 to msgNum
  4899. >           tell application "Eudora"
  4900. >                 if field "Subject" of (item i of msgList as message)
  4901. >contains "test" then
  4902. >                         beep -- here's where you process the message
  4903. >                 end if
  4904. >           end tell
  4905. >        end repeat
  4906. >end <<event CSOmeNot>>
  4907.  
  4908. I have been able to register with Eudora (1.4.2) and I get the New Mail
  4909. notification, but the parameter msgList is always empty if I, say, try to
  4910. place it in Scriptable Text Editor.  What's supposed to be in there?  Are
  4911. these supposed to be only the new messages (that's exactly what I need)?  I
  4912. should be able to work around it by directly asking Eudora for the info,
  4913. but has anyone else got this to work?
  4914.  
  4915. --Dave
  4916.  
  4917.  
  4918.  
  4919. David L. Brown <dlb1@lle.rochester.edu>
  4920. Laboratory for Laser Energetics
  4921. 250 East River Road
  4922. Rochester, NY 14623 USA                                           UR  \|/
  4923. -----------------------------------------------------------------------*--
  4924. (716) 275-6880                                                    LLE /|\
  4925. =========================================================================
  4926. Date:         Thu, 14 Apr 1994 11:00:41 -0500
  4927. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4928. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4929. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  4930. Subject:      Re: Menu Events, Menu Grabber,
  4931.  
  4932.  >Menu Grabber is way kewl. But iwas just able to restart my
  4933.  >colleagues mac, without he coming to know about. Aren't we
  4934.  >talkin a major security hole here? I know I know, u can turn
  4935.  >off your filesharin/linkin...but thats not what i am lookin at...
  4936.  
  4937.  (Just to clarify, Menu Events and Menu Grabber don't use Finder AE's
  4938.   like 'FNDR'/'rest', but you can tell them to select a menu item in
  4939.   Finder called "Restart".)
  4940.  
  4941. which when you choose will restart the Mac. I think the endresult is
  4942. a bit too interesting than the actual process that is involved. clear!
  4943.  
  4944.  If you have Menu Events installed, here's how to protect yourself
  4945.  against Marilyn and her kind:
  4946.  
  4947. Yup, always use protection, it helps in any case. Gawd, if only they
  4948. practised it in the sixties...
  4949.  
  4950.  1.  Turn off Program Linking in Sharing Setup, so that Menu Events
  4951.      and Menu Grabber will only work locally; or
  4952.  2.  Deny guests the privilege of linking to programs on your Mac; or
  4953.  
  4954. In other words, go back to '60s, make your Mac an ugly standalone,
  4955. rip all its kewl sharin features, don't let anyone touch your mac,
  4956. not even to play Bolo or SuperMaze wars..
  4957.  
  4958.  3.  Use a particular application's Sharing dialog to turn off remote
  4959.      program linking (does this work on 7.1.2's Finder?); or
  4960.  
  4961. What was thaat again.....
  4962.  
  4963.  4.  Lock the Menu Events extension file (startup icon will reflect
  4964.      change), so that only applications running in kAEInteractWithAll
  4965.      mode will accept a Select Menu Item event from a remote sender.
  4966.      I doubt there are many non-scriptable applications which choose
  4967.      run in this mode, or which let you select this mode through GUI.
  4968.      kAEInteractWithLocal is the default, and Menu Events cleverly
  4969.      overrides that setting if you don't lock it - hence the hole!
  4970.  
  4971. Hmmm.. I have to try this, and see what happens. Its interestin to
  4972. see how it overrides that setting of any appl, even if the appl is
  4973. locked, when the menu events extnsn ain't locked.
  4974.  
  4975. But as i said before, menu events is still kewl, it is just its
  4976. spokesman who ain't. :-)))))
  4977.  
  4978. __ __
  4979. Marilyn Monroe
  4980. Bring Back the Goddess Inc.
  4981.  
  4982. Don't tell me later that folks in Temple think the same way
  4983. folks in Heaven do.
  4984. =========================================================================
  4985. Date:         Thu, 14 Apr 1994 08:20:06 LCL
  4986. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4987. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  4988. From:         Tim Keanini <Tim_Keanini@BRODER.COM>
  4989. Subject:      Re: Frontier price == $495???
  4990.  
  4991. >The newest MacWeek has a comparison between UserLand Frontier and
  4992. >AppleScript.  The review was balanced overall in my opinion, but one
  4993. >item really caught me by surprise.  Apparently, UserLand has increased
  4994. >the price to $495!  I'm glad I've already bought it, because I never
  4995. >would have paid that much for it.  Putting aside questions of whether
  4996. >it is "worth it" or not, I simply could not have afforded it.
  4997.  
  4998. I am happy that I bought it early too.:-)
  4999.  
  5000. >Does anybody else agree with me that this will kill the market for the
  5001. >product?  I have assumed all along that UserLand was targeting the
  5002. >hobbyist/tinkerer rather than the corporate developer...
  5003.  
  5004. I have gotten 90% of all my work this past 2 years done in Frontier.
  5005. I still don't think that Applescript ships with enough stuff to call itself a
  5006. development system (no good debugger yet).  Don't get me wrong, I am not trying
  5007. to start a flame war here, I just think that Frontier, given its evolution, is
  5008. higher on the food chain when it comes to really getting a script written,
  5009. debugged, and working.
  5010.  
  5011. If you look at the Frontier side, they did not charge for the 1.0 to 2.0 and
  5012. they now charge a little for the 2.0 to 3.0, it may add up to a discounted
  5013. 495.00 list maybe?  Does anyone know what the discounted price for Frontier is
  5014. now?
  5015.  
  5016. If you take a look at AppleScript, I bought it at 1.0, then paid to upgrade to
  5017. 1.1, and I still need to buy a good debugger.  I would like to make a humble 
  5018. and
  5019. simple comparison here:
  5020. When Apple released Quicktime, they shipped it with the Simple Player, they did
  5021. not ship it with Adobe's Premiere.  Needless to say that until Premiere came
  5022. out, you really could not do any development on it.
  5023. Given that, when Apple released AppleScript, they shipped it with the
  5024. ScriptEditor, they did not ship it with _development_system. (I live in my
  5025. debugger).
  5026. So, now I need to buy one, but, there are none out yet on the market, and when
  5027. the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
  5028. 1.0).
  5029.  
  5030. OK, so here is what Apple script is going to cost me for the same type of
  5031. development tools that I have on Frontier 3.0.
  5032. Apple 1.0           $199.00
  5033. upgrade to 1.1      $ 99.00
  5034. Scriptor 1.0        $249.00
  5035.  
  5036. Not to mention the fact that development on a 1.0 version make me nervous if I
  5037. have a deadline.
  5038.  
  5039. Again, I am not complaining about anything, I really love both of them, I just
  5040. wish that the AppleScript side of this would catch up quicker.
  5041.  
  5042. --Tim Keanini    blast@crl.com
  5043. ps I personally would still buy Frontier at that price, it would just have 
  5044. taken
  5045. me longer to save up.:-)
  5046. =========================================================================
  5047. Date:         Thu, 14 Apr 1994 11:39:29 -0400
  5048. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5049. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5050. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  5051. Subject:      Re: OSA Menu
  5052. In-Reply-To:  <no.id> from "Matthew Ahrens" at Apr 14, 94 10:32:01 am
  5053.  
  5054. --Matthew Ahrens wrote:
  5055. >
  5056. >I have a script that does an operation on the finder selection, and it runs
  5057. >find from the script editor, but it would be a lot more useful if i could run
  5058. >it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
  5059. >it gives me an error of -1762. What does this mean, and how can i fix it?
  5060.  
  5061.     Sounds like you might need to increase your Finder memory. If you
  5062. have ResEdit you should make a copy of your Finder, open it up; open up
  5063. the SIZE resource and double-click on the -1. Scroll to bottom and
  5064. increase the highlighed number. The normal setting is 155k. I have mine
  5065. set to 1MB, but 512k is probably good enough.
  5066.  
  5067. -Hades
  5068. =========================================================================
  5069. Date:         Thu, 14 Apr 1994 11:21:25 -0700
  5070. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5071. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5072. From:         "Erik C. Thauvin" <ravensys@ESKIMO.COM>
  5073. Subject:      Re: Frontier price increased to $495???
  5074. In-Reply-To:  <199404141417.AA23677@eskimo.com>
  5075.  
  5076. On Thu, 14 Apr 1994, David Myers wrote:
  5077.  
  5078. > The newest MacWeek has a comparison between UserLand Frontier and
  5079. > AppleScript.  The review was balanced overall in my opinion, but one
  5080. > item really caught me by surprise.  Apparently, UserLand has increased
  5081. > the price to $495!  I'm glad I've already bought it, because I never
  5082. > would have paid that much for it.  Putting aside questions of whether
  5083. > it is "worth it" or not, I simply could not have afforded it.
  5084. >
  5085. > Does anybody else agree with me that this will kill the market for the
  5086. > product?  I have assumed all along that UserLand was targeting the
  5087. > hobbyist/tinkerer rather than the corporate developer...
  5088. >
  5089. > David C. Myers
  5090. >
  5091.  
  5092. $495 is pretty steep. UserLand doesn't have a huge market share at this
  5093. point, I don't see how the price increase will make it any better for them.
  5094.  
  5095. A $495 sticker price places Frontier into the Symantec C++ price range;
  5096. although completely different products, SC++ seems like a much better deal
  5097. to me.
  5098.  
  5099. E.
  5100.  
  5101.  
  5102. --
  5103. Erik C. Thauvin      | Custom Software Solutions |   Raven Systems Limited
  5104. ravensys@eskimo.com  | For Everyday Problems.    |        P. O. Box 560894
  5105. +1 (206) 747-9819    |                           |  Orlando, FL 32856, USA
  5106.             URL= file://eskimo.com/ravensys/www/raven.html
  5107. =========================================================================
  5108. Date:         Thu, 14 Apr 1994 11:22:22 -0800
  5109. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5110. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5111. From:         Chuck Pliske <chuckp@U.WASHINGTON.EDU>
  5112. Subject:      Re: Restarting Remote mac
  5113.  
  5114. >Is there any way to restart a remote mac (assuming you have all the proper
  5115. >access privs) without having to deal with extensions that need a restart in
  5116. >the first place?
  5117.  
  5118. Depending on *why* you want to restart, I wrote some time ago a trivial
  5119. little app which used time manager calls to detect when the "mainline"
  5120. crashed, by counting from an interrupt and resetting the count from the
  5121. mainline.  After a compilable amount of time with no reset, it restarts the
  5122. machine.  It's a faceless bg app, about 4k, and has saved my butt many times.
  5123.  Anyone wants it, just ask. There is also a more "professional" shareware
  5124. program on sumex designed for the same purpose.
  5125.  
  5126. Chuck
  5127. =========================================================================
  5128. Date:         Thu, 14 Apr 1994 12:47:15 -0600
  5129. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5130. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5131. From:         Sean Elfstrom <selfstro@NEPTUNE.CS.TRINITY.EDU>
  5132. Subject:      Re: OSA Menu
  5133. In-Reply-To:  <9404141558.AA04656@neptune.cs.trinity.edu> from "Matthew Ahrens"
  5134.               at Apr 14, 94 10:32:01 am
  5135.  
  5136. >
  5137. > I have a script that does an operation on the finder selection, and it runs
  5138. > find from the script editor, but it would be a lot more useful if i could run
  5139. > it from OSA Menu. unfortunately, when i choose the script from OSA Menu,
  5140. > it gives me an error of -1762. What does this mean, and how can i fix it?
  5141. >
  5142. > also, what is the email address of Leonard Rosenthal, the author of OSA Menu?
  5143. > (so that i can ask him this question also)
  5144. >
  5145. > tia!!
  5146. >
  5147. > --
  5148. > My opinions are mine only and tentative, pending further data
  5149. >                         Matthew Ahrens
  5150. > ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  5151. > MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  5152. >
  5153.  
  5154. The advice given to me, when I had the same problem, was to increase the
  5155. amount of memory allocated to the Finder. The instructions on how to do
  5156. this, as given to me by John Baxter are as follows:
  5157.  
  5158. >If you only have one startup volume prepared, make a copy of Finder by
  5159. >dragging its icon to another folder while holding down the option key.
  5160. >Using ResEdit or one of the others, modify the SIZE -1 resource.  Add
  5161. >100,000 or so to the second size box in that resource (shown in decimal
  5162. >bytes by ResEdit, other editors may differ).  Quit ResEdit or whatever.
  5163. >Drag the Finder out of the System Folder (to Trash is OK).  Drag your
  5164. >modified Finder into the System folder.  Restart.
  5165. >
  5166. >If you have two startup volumes available, restart from the other one,
  5167. >change the Finder on your regular one, and restart from your regular
  5168. >startup volume.
  5169.  
  5170. When I did that, (and upgraded to AS 1.1) everything worked!
  5171.  
  5172. Leonard's address is leonardr@NETCOM.COM.
  5173.  
  5174. --
  5175. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5176. | Sean Elfstrom                              | Trinity University         |
  5177. | selfstro@tusol.cs.trinity.edu              | 715 Stadium Dr. #707       |
  5178. | NeXTMail: selfstro@oberon.cs.trinity.edu   | San Antonio, TX 78212-7200 |
  5179. | **PGP 2.3 Signature available via finger** | (210)737-4728   McLean 124 |
  5180. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5181. =========================================================================
  5182. Date:         Thu, 14 Apr 1994 14:39:33 -0400
  5183. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5184. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5185. From:         Luis Muench <muench@SOLIX.FIU.EDU>
  5186. Subject:      Are scripts available?
  5187.  
  5188. I just downloaded Leonard Rosenthal's OSA Menu 1.0, which places a
  5189. script-playing menu next to the help menu.  Through this menu, and its
  5190. associated folders in the system folder you can launch scripts for the app
  5191. you are currently in.  The associated folders in the system folder work
  5192. like the apple menu items folder.  You put the finder scripts in the
  5193. finder folder and they will become immediately available under the
  5194. Script-playin menu.
  5195.  
  5196.         The author mentions that the scripts must be 'compiled', not text
  5197. files.
  5198.  
  5199.         Since I have no way of generating these compiled scripts, I was
  5200. wondering if anyone would know where there may be compiled scripts one
  5201. could download and use.  I would be particularly interested in any kind of
  5202. finder scripts.
  5203.  
  5204.  
  5205. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5206. <<<<<<Reality is anything that cannot be undone or avoided
  5207. >>>>>>Luis Muench -- muench@solix.fiu.edu
  5208. =========================================================================
  5209. Date:         Thu, 14 Apr 1994 16:12:28 -0400
  5210. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5211. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5212. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  5213. Subject:      Translating via Stuffit
  5214.  
  5215. okok, i know that this was a topic of discussion awhile ago, so just reply
  5216. to me, don't bother sending it to the list.
  5217.  
  5218. how do i get Stuffit to translate a file using the translate menu via
  5219. applescript? a nice, simple answer would be nice. i tried
  5220. translate  match name "BinHex4" command "encode  \"" & <filepath> & "\""
  5221. but it didn't work. (filepath is a string, not an alias)
  5222.  
  5223. btw, i have stuffit version 3.0.5, is that the most rescent?
  5224.  
  5225. --
  5226. My opinions are mine only and tentative, pending further data
  5227.                         Matthew Ahrens
  5228. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  5229. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  5230. =========================================================================
  5231. Date:         Thu, 14 Apr 1994 15:12:28 -0500
  5232. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5233. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5234. From:         Robert Walker <rwalker@LOCHNESS.UHC.COM>
  5235.  
  5236. SIGNOFF Robert Walker
  5237. --
  5238.                           __        __
  5239. Robert Walker            |  | _()_ |  |   E-Mail:  rwalker@uhc.com
  5240. United HealthCare Corp   |  | \  / |  |   AT&T: (612) 945-6533
  5241.                          |  \__\/__/  |   Fax:  (612) 945-6502
  5242.                           \__________/
  5243. =========================================================================
  5244. Date:         Thu, 14 Apr 1994 15:31:12 -0500
  5245. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5246. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5247. From:         Fred Terry <pfterry@LKS.CSI.COM>
  5248. Subject:      Re: Translating via Stuffit
  5249. In-Reply-To:  Your message of "Thu, 14 Apr 94 16:12:28 EDT"
  5250.  
  5251. >okok, i know that this was a topic of discussion awhile ago, so just reply
  5252. >to me, don't bother sending it to the list.
  5253. >
  5254. >how do i get Stuffit to translate a file using the translate menu via
  5255. >applescript? a nice, simple answer would be nice. i tried
  5256. >translate  match name "BinHex4" command "encode  \"" & <filepath> & "\""
  5257. >but it didn't work. (filepath is a string, not an alias)
  5258. >
  5259.  
  5260. This reminds me. I don't think I've mentioned it, but I've been archiving the
  5261. monthly digests on gaea. You'll find them in
  5262.  
  5263. ftp://gaea.kgs.ukans.edu/applescript/docs/digestsfeb94
  5264. ftp://gaea.kgs.ukans.edu/applescript/docs/digests/mar94
  5265.  
  5266. BBEdit can find stuff in them in no time at all. :-)
  5267.  
  5268. pf
  5269.  
  5270.  
  5271. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5272. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  5273. =========================================================================
  5274. Date:         Thu, 14 Apr 1994 17:12:27 -0400
  5275. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5276. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5277. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  5278. Subject:      Re: Translating via Stuffit
  5279. In-Reply-To:  <no.id> from "Fred Terry" at Apr 14, 94 03:31:12 pm
  5280.  
  5281. --Fred Terry wrote:
  5282. >
  5283. >This reminds me. I don't think I've mentioned it, but I've been archiving the
  5284. >monthly digests on gaea. You'll find them in
  5285.  
  5286.     This is kind of cool. Thanks Fred. ;->
  5287.  
  5288. >ftp://gaea.kgs.ukans.edu/applescript/docs/digestsfeb94
  5289. >ftp://gaea.kgs.ukans.edu/applescript/docs/digests/mar94
  5290. >
  5291. >BBEdit can find stuff in them in no time at all. :-)
  5292.  
  5293.     You can also get a really nice interface to the digest files using
  5294. EasyView. It does, however, require a small modification. You need to
  5295. hold down the option key and select Preferences... When the dialog box
  5296. open up change the Mail Start field from "From" to "Date:" (without the
  5297. quotes). This formats the digest file quite nicely. And you can also set
  5298. the format of the chapters. I usually set mine to Sender*Subject for
  5299. digests.
  5300.  
  5301. -Hades
  5302. =========================================================================
  5303. Date:         Thu, 14 Apr 1994 14:50:20 -0700
  5304. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5305. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5306. From:         Benjamin Broder <bbroder@HSC.USC.EDU>
  5307. Subject:      Applescript Scripter's Kit vs. AS Software Developer's Kit
  5308.  
  5309. Sorry if this comes through twice, I sent it to the wrong address the
  5310. first time.
  5311.  
  5312. What are the differences (in cost and contents) between the
  5313. AS Scripter's Kit and the AS Software Developer's Kit?
  5314.  
  5315. Ben
  5316. --
  5317. bbroder@hsc.usc.edu     Benjamin Broder    FAX (818) 457-4100
  5318. USC Institute for Health Promotion and Disease Prevention Research
  5319. 1000 S. Fremont Ave. #641, Alhambra, CA 91803-1358 (818) 457-4029
  5320. =========================================================================
  5321. Date:         Thu, 14 Apr 1994 16:05:40 -0500
  5322. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5323. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5324. From:         "Dennis J. Wilkinson, II" <djw@CRA.COM>
  5325. Subject:      Re: Example Eudora Scripts
  5326.  
  5327. >I have been able to register with Eudora (1.4.2) and I get the New Mail
  5328. >notification, but the parameter msgList is always empty if I, say, try to
  5329. >place it in Scriptable Text Editor.  What's supposed to be in there?  Are
  5330. >these supposed to be only the new messages (that's exactly what I need)?  I
  5331. >should be able to work around it by directly asking Eudora for the info,
  5332. >but has anyone else got this to work?
  5333.  
  5334. Apparently there's a flaw somewhere between Eudora and AppleScript -- seems
  5335. like the only thing you can actually do with msgList is find out how many
  5336. items are in it (get the number of items of msgList).
  5337.  
  5338. If you otherwise try to work with it, your scripts will either:
  5339.   a) Generate an error -or-
  5340.   b) Just stop (no error, no hang, just stop doing what they're doing.)
  5341.  
  5342. Yes, try-on error-end try sets do seem to behave, from what I can tell.
  5343.  
  5344.  
  5345.  
  5346. -- Dennis
  5347.  
  5348. ----------------------------------------------------------------------------
  5349. Dennis J. Wilkinson, II                 : Usual disclaimers apply. If I put
  5350. djw@cra.com                             : my foot in my mouth, it's my
  5351. Software Engineer                       : fault, and has nothing at all to
  5352. Charles River Analytics, Cambridge MA   : do with Charles River Analytics
  5353. =========================================================================
  5354. Date:         Fri, 15 Apr 1994 10:20:22 +1200
  5355. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5356. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5357. From:         Tim Bates <timothy@BIO.AUCKLAND.AC.NZ>
  5358. Organization: University of Auckland, New Zealand
  5359. Subject:      admin- help needed in signi
  5360.  
  5361.         Reply to:   admin: help needed in signing off
  5362. Hi,
  5363. I have tried signing off under all the accounts I know of, however
  5364. I remain connected and persona non grata. I initially subscribed to
  5365. frontier if that helps.
  5366.  
  5367. Could you please disconnect someone called <timothy bates>. It
  5368. is probably me ;-)
  5369.  
  5370. thanks very much
  5371. tim bates
  5372. =========================================================================
  5373. Date:         Thu, 14 Apr 1994 21:14:06 EST
  5374. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5375. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5376. From:         INRA000 <INRA@MUSICB.MCGILL.CA>
  5377. Subject:      Need beta testers for File Tracker.
  5378.  
  5379. Greetings Netters,
  5380.  
  5381.     I'm finishing a long-running project of mine and am looking for a (few)
  5382. beta testers to put my final product through the grinder before it gets
  5383. released. I'm posting my request to the MacScripting list because this
  5384. product has quite a bit to do with AppleScript or any other OSA-compliant
  5385. scripting language. The program's final name will be File Tracker.
  5386.  
  5387.     This program is what would now be called an "improved Folder Watcher"
  5388. although development was started long before that program was released. In
  5389. a nutshell, File Tracker can "watch" files or folders on your hard drive
  5390. or someone else's over a network, and take action when changes are detected.
  5391. The clincher is that File Tracker builds an internal image of watched folders
  5392. which it uses to detect exactly *what* occured when a change is detected. In
  5393. this way, you can set File Tracker up to take a specific action, say opening
  5394. the involved items, when files *arrive* in a folder, but a completely different
  5395. action if files are *modified* within the folder. In all cases, File Tracker
  5396. can pinpoint the files or subfolders involved.
  5397.  
  5398.     File Tracker detects just about any conceivable occurance involving files
  5399. or folders, including the ability to scan for files not modified for a certain
  5400. length of time. File Tracker works best with AppleScript, but includes a
  5401. built-in set of actions that include the ability to mount and unmount network
  5402. volumes automatically, move, open, alias or copy files, and file detailed
  5403. reports. File Tracker can intelligently backlog files if they are busy or if
  5404. some other condition prevents them from being processed immediately. For
  5405. example, File Tracker will wait for a download to be complete before attempting
  5406. to decompress an item, or will wait for enough memory to be available before
  5407. opening an item with an application that is not running.
  5408.  
  5409.     File Tracker will be shareware $15US. The distributable program is fully
  5410. functional -- no crippleware or annoying messages. (Although there's an
  5411. Easter Egg for registered users). :-)
  5412.  
  5413.     I'm looking for people with an interesting application for File Tracker
  5414. to give it a test run in the real world to shake loose any problems I may
  5415. have overlooked in my own testing. Ideally, testers should be interested in
  5416. using both the built-in set of actions as well as AppleScript for processing,
  5417. since that will give the program the most thorough work-out.
  5418.  
  5419.     If you're interested in beta-testing File Tracker, drop me a line. I
  5420. can't offer you anything more than a free registered copy of the final product,
  5421. immortality in the form of your name in the about box, and my thanks, but
  5422. hey -- you will have helped polish a shareware product. :-) I'm planning to
  5423. start the beta test period on Monday -- people chosen as beta sites will
  5424. receive the full distribution package then. I would like it if people wishing
  5425. to beta-test File Tracker had a debugger (ex: MacsBug) installed on their
  5426. machine, since it makes bug reports so much easier.
  5427.  
  5428.     Everyone else, hang in there. File Tracker has been a long time in
  5429. development, and I'm pretty confident that I've nailed everything in my own
  5430. evaluations. With any luck, the beta period shouldn't be very long.
  5431.  
  5432.     Cheers,
  5433.  
  5434.     Mark Aiken
  5435.     inra@musicb.mcgill.ca
  5436. =========================================================================
  5437. Date:         Fri, 15 Apr 1994 00:25:42 -0400
  5438. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5439. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5440. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  5441. Subject:      Re: Frontier price increased to $495???
  5442.  
  5443. At 10:31 AM 4/14/94 -0400, Luis Muench wrote:
  5444. >Whoa, dude!  $495.00.  Sheesh!  I think its time someone (who can) should
  5445. >create a "Bare-Bones" scripting environment for us po'folk on the net.  I
  5446. >WOULD pay my shareware! I swear! Hmm... Maybe AppleScript is my answer!
  5447.  
  5448. I think Tickle is has a Scripting component as part of it, and is able to
  5449. use the various osaxen and the like.  However, I think you need to have
  5450. AppleScript to get the other parts (like Apple Event Manager, and the OSA
  5451. stuff)
  5452.  
  5453. I pulled tickle off gaea, and plan to get to playing with it eventually.
  5454. It seems to be quite useful to people I know who use it under UNIX.
  5455.  
  5456. Bob
  5457.  
  5458. --
  5459. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  5460. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  5461.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  5462. =========================================================================
  5463. Date:         Fri, 15 Apr 1994 00:01:20 -0700
  5464. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5465. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5466. From:         Jon Pugh <jonpugh@NETCOM.COM>
  5467. Subject:      5 Answers
  5468.  
  5469. ITEM 1:
  5470. >Any given data parameter that is passed to a scripting addition is first
  5471. >targeted down to a specific apple-event to the addition. Then, the data is
  5472. >stuffed into an apple-event descriptor that fits the data format specified
  5473. >in the scripting addition's aete. During this time, no coercion of the data
  5474. >takes place (unless the 'as xxxxx' syntax is used); the data is passed
  5475. >as-is, with the actual type of the data being a part of the above
  5476. >descriptor.
  5477.  
  5478. This is not entirely correct.  The data type in the aete is purely there
  5479. for the user.  AppleScript doesn't use it for anything.  All it uses are
  5480. the parameters and it doesn't even make sure that you supply all the
  5481. required ones.  Your event handler has to do that.  Thus, you are correct
  5482. in stating that the data is passed as-is.
  5483.  
  5484. >It is actually the addition that performs/requests coercions, when it pulls
  5485. >the info out of the appleevent...the data may be in any form before the
  5486. >coercion takes place, with the assumption being the data is convertible. So
  5487. >if testaddition takes a long as a parameter, but is passed a string like
  5488. >"15542", the text string "15542" is passed with its type as typeText.
  5489.  
  5490. This is entirely correct and very important in AppleScript/AE.
  5491.  
  5492. ITEM 2:
  5493. >Can anybody tell me why the following piece of code:
  5494. >
  5495. >set fd to open for access {file destinationFile}
  5496. >set theText to read fd from 1 to -1 as text
  5497. >close access fd
  5498. >display dialog theText
  5499. >
  5500. >works when destinationFile is a real file (in this case, created by
  5501. >TeachText), but does not work when it is an alias to the same real file
  5502. >(such as created by "Make Alias" from the File menu or by "symlink" in
  5503. >MacPerl).  In the case when destinationFile is an alias, I get an "End of
  5504. >file error".  Note that I get the same behavior when the first line reads:
  5505. >
  5506. >set fd to open for access {alias destinationFile}
  5507. >
  5508. >I come from a Unix world, so I thought (perhaps incorrectly :-) ), that
  5509. >Finder aliases were like Unix symbolic links.
  5510.  
  5511. Not quite.  There is still application support required for dealing with
  5512. aliases, but the system manages to hide it from most apps.  Notably, when
  5513. dropping a file on another, the alias is resolved first.  Also, when an
  5514. alias is chosen in the standard file dialogs, the alias is resolved (try
  5515. option clicking on an alias in the standard file dialog).
  5516.  
  5517. The File Commands osax forgot to resolve aliases.  I'll report it as a bug.
  5518.  
  5519. ITEM 3:
  5520. >>Is anyone having problems with this osax?  When I use it to try and move a
  5521. >>folder on a network-mounted volume to the trash, I get a dialog stating that
  5522. >>the folder already exists there and do I want to replace the existing one.
  5523.  
  5524. Yeah, there's something broken in that script.  I forget what, but it
  5525. relates to the fact that network volumes don't always have trash folders.
  5526. If they are write protected a certain way then you can't put things in the
  5527. trash.  If you try it from the Finder you'll probably get a message saying
  5528. something like "File can't be put in the trash, delete it immediately?"
  5529.  
  5530. If you can't afford to delete it immediately, then make a copy somewhere
  5531. you _can_ write to, like the boot volume's trash, and then delete the file.
  5532.  
  5533. ITEM 4:
  5534. >    Sounds like you might need to increase your Finder memory. If you
  5535. >have ResEdit you should make a copy of your Finder, open it up; open up
  5536. >the SIZE resource and double-click on the -1. Scroll to bottom and
  5537. >increase the highlighed number. The normal setting is 155k. I have mine
  5538. >set to 1MB, but 512k is probably good enough.
  5539.  
  5540. Actually, about 300K is plenty.  You can probably get away with less too.
  5541.  
  5542. The best thing is to bug Leonard (leonardr@netcom.com) to finish version
  5543. 1.0.1 of OSA Menu which fixes these memory problems.  ;)
  5544.  
  5545. ITEM 5:
  5546. >        Since I have no way of generating these compiled scripts, I was
  5547. >wondering if anyone would know where there may be compiled scripts one
  5548. >could download and use.  I would be particularly interested in any kind of
  5549. >finder scripts.
  5550.  
  5551. Compiled scripts won't help.  You need AppleScript.  OSA Menu isn't enough.
  5552. If you have AppleScript then you have the Script Editor and you _can_
  5553. compile scripts.  Of course, learning how is why this list was created.  ;)
  5554.  
  5555. Sorry about rolling all of this into one response, but hey, tough.  ;)
  5556.  
  5557. Jon
  5558. =========================================================================
  5559. Date:         Fri, 15 Apr 1994 10:20:28 +0100
  5560. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5561. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5562. From:         Johan Solve <johan.solve@ITN.HH.SE>
  5563. Subject:      AppleScript speed (or slowness)
  5564.  
  5565. I'm generally disappointed with the speed of AppleScript when it comes to
  5566. cooperation with different applications.
  5567.  
  5568. For example, I have one script that calculates the median value (the middle
  5569. value in a series) in a FileMaker database. After the database is sorted,
  5570. it takes up to 15 seconds before I get the respons. The script itself can't
  5571. be so slow, it has to be the AppleEvent traffic that is the bottleneck.
  5572.  
  5573. I have another script that sorts my Eudora mail into different mailboxes.
  5574. It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
  5575. one single message. I don't think that the script itself is slow, there is
  5576. nothing strange with it, besides perhaps the try statement.
  5577.  
  5578. My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  5579. itself (I still use 1.0, waiting for the Goodman update...).
  5580. I'm running a IIvx with 7.1.
  5581.  
  5582.  
  5583. What are your opinions or suggestions when it comes to AppleScript speed
  5584. when cooperating with applications? Is it a general rule to bring
  5585. AppleEvent calls to a minimum? For example, the sort mail script could
  5586. perhaps fetch the entire header in one AE call (don't know if Eudora
  5587. supports this), and process the information further within AppleScript. Am
  5588. I correct?
  5589.  
  5590.  
  5591. Here are the scripts, if anyone suspects them for poor performance.
  5592. Comments are welcome.
  5593. Wrapped lines end with --
  5594.  
  5595.  
  5596. Script for median value in FileMaker :
  5597. ---------
  5598. tell application "FileMaker Pro"
  5599.     activate
  5600.     Sort by Field "month salary" of Layout "form" of Database "Salaries"
  5601.     set n to Record Count
  5602. end tell
  5603. set median to midvalue(1, n)
  5604. set undkvart to midvalue(1, (round (n / 2) rounding up))
  5605. set uppkvart to midvalue(((round (n / 2) rounding down) + 1), n)
  5606. tell application "FileMaker Pro"
  5607.     display dialog "Median:   " & median & " kr" & return & return --
  5608.         & "Lower quarter:   " & undkvart & " kr" & return --
  5609.         & "Upper quarter:     " & uppkvart & " kr" buttons {"OK"} default --
  5610.         button "OK"
  5611. end tell
  5612.  
  5613. on midvalue(firstrecord, lastrecord)
  5614.     set n to lastrecord - (firstrecord - 1)
  5615.     set m to firstrecord - 1 + (round n / 2 rounding down)
  5616.     tell application "FileMaker Pro"
  5617.         set a to Get Data of Cell "month salary" of Record m of --
  5618.         Layout "form" of Database "Salaries"
  5619.         set b to Get Data of Cell "month salary" of Record (m + 1) of --
  5620.         Layout "form" of Database "Salaries"
  5621.         if n / 2 = (round n / 2) then
  5622.             set median to round (a + b) / 2
  5623.         else
  5624.             set median to round (b + 0)
  5625.         end if
  5626.     end tell
  5627.     return median
  5628. end midvalue
  5629. ---------
  5630.  
  5631.  
  5632.  
  5633. Eudora sort mail script:
  5634. ---------
  5635. tell application "Eudora1.4.2"
  5636.     --activate  -- disabled, faster if script is in foreground ?
  5637.     set n to number of message of mailbox "In" of mail folder ""
  5638.     set i to 1 -- use separate counter since the pointer should only
  5639.                -- increase if we don't move a message
  5640.     repeat with j from 1 to n
  5641.         try
  5642.             set itsTo to field "To" of message i of mailbox "In" of --
  5643.             mail folder ""
  5644.         on error
  5645.             set itsTo to ""
  5646.         end try
  5647.         try
  5648.             set itsCC to field "cc" of message i of mailbox "In" of --
  5649.             mail folder ""
  5650.         on error
  5651.             set itsCC to ""
  5652.         end try
  5653.         try
  5654.             set itssender to field "sender" of message i of mailbox --
  5655.             "In" of mail folder ""
  5656.         on error
  5657.             set itssender to ""
  5658.         end try
  5659.         set itsTo to itsTo & return & itsCC & return & itssender
  5660.         if itsTo contains "applescript%" or itsTo contains --
  5661.         "MACSCRPT%" then
  5662.             move message i of mailbox "In" of mail folder "" --
  5663.             inserthere end of mailbox "AppleScript" of mail folder ""
  5664.         else if itsTo contains "YACHT-L%" then
  5665.             move message i of mailbox "In" of mail folder "" --
  5666.             inserthere end of mailbox "yacht and sail" of mail folder ""
  5667.         else if itsTo contains "FMPRO-L%" then
  5668.             move message i of mailbox "In" of mail folder "" --
  5669.             inserthere end of mailbox "FileMaker Pro" of mail folder ""
  5670.         else if itsTo contains "info-mac digest" then
  5671.             move message i of mailbox "In" of mail folder "" --
  5672.             inserthere end of mailbox "info-mac digest" of mail folder ""
  5673.         else
  5674.             set i to i + 1 -- no message moved, increase pointer
  5675.             if i > number of message of mailbox "In" of mail folder --
  5676.             "" then exit repeat -- moved all messages already
  5677.         end if
  5678.     end repeat
  5679. end tell
  5680. play sound "doorbell"
  5681. ---------
  5682.  
  5683. _______________________________________________________________________
  5684.           "
  5685.    JOHAN SOLVE                   Department of Science and Technology
  5686.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  5687. =========================================================================
  5688. Date:         Fri, 15 Apr 1994 03:57:15 -0800
  5689. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5690. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5691. From:         Christopher Allen <consensus@NETCOM.COM>
  5692. Organization: Consensus Development Corporation, San Francisco, CA USA
  5693. Subject:      Re: AppleScript speed (or slowness)
  5694.  
  5695. At 10:20 AM 4/15/94 +0100, Johan Solve wrote:
  5696. >I have another script that sorts my Eudora mail into different mailboxes.
  5697. >It works very well, but is SOOOOO slow. It takes up to 10 seconds to sort
  5698. >one single message. I don't think that the script itself is slow, there is
  5699. >nothing strange with it, besides perhaps the try statement.
  5700.  
  5701. I use Eudora 2.0.2, which has filtering built in for the function you are
  5702. trying to script. I find it FANTASTIC, as I deal with 300+ mail messages a
  5703. day.
  5704.  
  5705. I am looking to do more scripting with Eudora, but personally not put a
  5706. whole lot of effort into writing a script to do filtering unless you needed
  5707. something the standard filters did not.
  5708.  
  5709. One thing that I've got on a sideburner for Eudora scripting is an email
  5710. exploder/digest maker, but I suspect that I'll have to wait for a future
  5711. version of Eudora with a few more features to get it working.
  5712.  
  5713. ------------------------------------------------------------------------
  5714. ..Christopher Allen                  Consensus Development Corporation..
  5715. ..<consensus@netcom.com>                         4104-24th Street #419..
  5716. ..                                        San Francisco, CA 94114-3615..
  5717. ..                                        o415/647-6383  f415/647-6384..
  5718. ..Mosaic/World-Wide-Web Front Door:                                   ..
  5719. ..ftp://netcom7.netcom.com/pub/consensus/www/ConsensusFrontDoor.html  ..
  5720. =========================================================================
  5721. Date:         Fri, 15 Apr 1994 08:05:00 -0400
  5722. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5723. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5724. From:         Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
  5725. Subject:      Re: Need beta testers for File Tracker.
  5726.  
  5727. >Greetings Netters,
  5728. >
  5729. >    I'm finishing a long-running project of mine and am looking for a (few)
  5730. >beta testers to put my final product through the grinder before it gets
  5731. >released. I'm posting my request to the MacScripting list because this
  5732. >product has quite a bit to do with AppleScript or any other OSA-compliant
  5733. >scripting language. The program's final name will be File Tracker.
  5734. >
  5735. We run an info system for K-12 education here in Georgia.  Hundreds of
  5736. files are being added, deleted or modified each day by our staff and the
  5737. 10K+ members of the system.  File Tracker looks like something that we
  5738. could very well "grind" rather vigorously.
  5739.  
  5740. Please count us in on your beta test.
  5741. =========================================================================
  5742. Date:         Fri, 15 Apr 1994 06:55:00 PDT
  5743. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5744. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5745. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  5746. Subject:      Re: Frontier price == $495???
  5747.  
  5748. > Given that, when Apple released AppleScript, they shipped it with the
  5749. > ScriptEditor, they did not ship it with _development_system. (I live in my
  5750. > debugger).
  5751. > So, now I need to buy one, but, there are none out yet on the market, and 
  5752. when
  5753. > the one that I want comes out, it will cost me $249.00 (Main Event Scriptor
  5754. > 1.0).
  5755. >
  5756. > OK, so here is what Apple script is going to cost me for the same type of
  5757. > development tools that I have on Frontier 3.0.
  5758. > Apple 1.0           $199.00
  5759. > upgrade to 1.1      $ 99.00
  5760. > Scriptor 1.0        $249.00
  5761.  
  5762. So...  what would you consider a *better* AppleScript release?
  5763.  
  5764. What I'm readying (Beta in May) is a product which contains a AppleScript
  5765. editing (find & replace, improved dictionary, etc) and debugging (single
  5766. step, break points, variable watching) environment, a copy of my Scheduler
  5767. utility and an expanded version of my Script Tools package.  I'm also
  5768. considering bundling AppleScript 1.1 with the software.
  5769.  
  5770. All of these items together, makes (I feel) AppleScript a really functional
  5771. and appealing product.
  5772.  
  5773. -Mark
  5774. =========================================================================
  5775. Date:         Fri, 15 Apr 1994 09:00:22 -0500
  5776. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5777. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5778. From:         Fred Terry <pfterry@LKS.CSI.COM>
  5779. Subject:      Re: admin- help needed in signi
  5780. In-Reply-To:  Your message of "Fri, 15 Apr 94 10:20:22 +1100"
  5781.  
  5782. >I have tried signing off under all the accounts I know of, however
  5783. >I remain connected and persona non grata. I initially subscribed to
  5784. >frontier if that helps.
  5785. >
  5786. >Could you please disconnect someone called <timothy bates>. It
  5787. >is probably me ;-)
  5788.  
  5789.  
  5790. I've sent the message. You should receive notification pretty soon. Let me
  5791. know if you are still getting messages.
  5792.  
  5793. pf
  5794.  
  5795.  
  5796. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5797. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  5798. =========================================================================
  5799. Date:         Fri, 15 Apr 1994 07:05:59 -0800
  5800. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5801. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5802. From:         Robert Mark <rmark@ISDMNL.WR.USGS.GOV>
  5803. Subject:      Re: AppleScript speed (or slowness)
  5804.  
  5805. >I'm generally disappointed with the speed of AppleScript when it comes to
  5806. >cooperation with different applications.
  5807. >
  5808. >For example, I have one script that calculates the median value (the middle
  5809. >value in a series) in a FileMaker database. After the database is sorted,
  5810. >it takes up to 15 seconds before I get the respons. The script itself can't
  5811. >be so slow, it has to be the AppleEvent traffic that is the bottleneck.
  5812. >
  5813. An Applescript initiated search for records in FileMaker Pro takes about 2
  5814. orders of magnitude longer than the same search initiated in FileMaker.
  5815.  
  5816. tell application "FileMaker Pro"
  5817.   show records (where cell 1 = "string")  --VERY SLOW!!
  5818. end tell
  5819. =========================================================================
  5820. Date:         Fri, 15 Apr 1994 10:56:00 -0400
  5821. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5822. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5823. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  5824. From:         ab026@FREENET.CARLETON.CA
  5825. Subject:      Re: Menu Events, Menu Grabber,
  5826.  
  5827. [deleted preceding conversation about ways to selectively plug the
  5828. intentional security hole in the Menu Events extension]
  5829.  
  5830. > 3.  Use a particular application's Sharing dialog to turn off remote
  5831. >     program linking (does this work on 7.1.2's Finder?); or
  5832. >
  5833. >What was thaat again.....
  5834. >
  5835. > 4.  Lock the Menu Events extension file (startup icon will reflect
  5836. >     change), so that only applications running in kAEInteractWithAll
  5837. >     mode will accept a Select Menu Item event from a remote sender.
  5838. >     I doubt there are many non-scriptable applications which choose
  5839. >     run in this mode, or which let you select this mode through GUI.
  5840. >     kAEInteractWithLocal is the default, and Menu Events cleverly
  5841. >     overrides that setting if you don't lock it - hence the hole!
  5842. >
  5843. >Hmmm.. I have to try this, and see what happens. Its interestin to
  5844. >see how it overrides that setting of any appl, even if the appl is
  5845. >locked, when the menu events extnsn ain't locked.
  5846.  
  5847. Each application has a bit in its 'SIZE' resource which allows or
  5848. disallows remote program linking.  If it's off, the program isn't
  5849. visible through PPC Toolbox across the network, so no Menu events.
  5850. This is the way to "lock" an application against remote senders.
  5851. If the application is visible, and Menu Events isn't locked, then
  5852. the extension won't respect the default kAEInteractWithLocal user
  5853. interaction restriction.
  5854.  
  5855. >But as i said before, menu events is still kewl, it is just its
  5856. >spokesman who ain't. :-)))))
  5857. >
  5858. >__ __
  5859. >Marilyn Monroe
  5860. >Bring Back the Goddess Inc.
  5861.  
  5862. Fella, if you're so cool, you can do without the pseudonym.
  5863.  
  5864. Ross Brown - AWOL Software Productions
  5865. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  5866. publisher of AWOL Utilities - "the best deal in freeware!"
  5867. ab026@freenet.carleton.ca
  5868. =========================================================================
  5869. Date:         Fri, 15 Apr 1994 11:27:50 -0500
  5870. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5871. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5872. From:         Steve Abrams <stevea@CS.UMD.EDU>
  5873. Subject:      Re: Need beta testers for File Tracker.
  5874.  
  5875. Mark,
  5876.  
  5877. If you're still looking for beta testers, I'd like to give it a try.  Part of 
  5878. my
  5879. job is to oversee the administrative staff of the Computer Science department
  5880. here.  I am particularly interested in FileTracker's ability to watch file
  5881. activities over the network to assist in troubleshooting (computer-illiterate
  5882. users can rarely accurately recount to me what they were doing prior to a crash
  5883. or freeze...this would add one more set of data points ... sometimes I wish 
  5884. Macs
  5885. would dump core just once <grin>).
  5886.  
  5887. Steve Abrams, Systems Programmer       E: stevea@cs.umd.edu,
  5888. Dept. of Computer Science                 abrams@vacation.venari.cs.cmu.edu,
  5889. University of Maryland at College Park    abrams.s@applelink.apple.com
  5890. =========
  5891. "Being afraid of monolithic organizations, especially when they have computers,
  5892. is like being afraid of really big gorillas, especially when they are on fire"
  5893.    -- Bruce Sterling
  5894. =========================================================================
  5895. Date:         Fri, 15 Apr 1994 11:58:34 -0400
  5896. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5897. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  5898. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  5899. Subject:      Re: AppleScript speed (or slowness)
  5900. In-Reply-To:  <no.id> from "Johan Solve" at Apr 15, 94 10:20:28 am
  5901.  
  5902. --Johan Solve wrote:
  5903. >
  5904. >I'm generally disappointed with the speed of AppleScript when it comes to
  5905. >cooperation with different applications.
  5906. >
  5907. > [ Stuff deleted ]
  5908. >
  5909. >My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  5910. >itself (I still use 1.0, waiting for the Goodman update...).
  5911. >I'm running a IIvx with 7.1.
  5912.  
  5913.     Well, I think that when you upgrade to AppleScript 1.1 you will see
  5914. some improvement in speed, but for the most part you are correct in your
  5915. thinking.
  5916.  
  5917. >What are your opinions or suggestions when it comes to AppleScript speed
  5918. >when cooperating with applications? Is it a general rule to bring
  5919. >AppleEvent calls to a minimum? For example, the sort mail script could
  5920. >perhaps fetch the entire header in one AE call (don't know if Eudora
  5921. >supports this), and process the information further within AppleScript. Am
  5922. >I correct?
  5923.  
  5924.     I don't know that much about scripting Eudora, but I do have a few
  5925. comments and ideas on your scripts...
  5926.  
  5927. >Script for median value in FileMaker :
  5928. >---------
  5929. >tell application "FileMaker Pro"
  5930. >    activate
  5931. >    Sort by Field "month salary" of Layout "form" of Database "Salaries"
  5932. >    set n to Record Count
  5933. >end tell
  5934.  
  5935.     If FileMaker Pro already has the Salaries database open and in
  5936. front, and the current layout is the "form" layout you can drop all
  5937. references to "of Layout ... of Database ..." AppleScript will work with
  5938. the current ones.
  5939.  
  5940. >tell application "FileMaker Pro"
  5941. >    display dialog "Median:   " & median & " kr" & return & return --
  5942. >        & "Lower quarter:   " & undkvart & " kr" & return --
  5943. >        & "Upper quarter:     " & uppkvart & " kr" buttons {"OK"} default --
  5944. >        button "OK"
  5945. >end tell
  5946.  
  5947.     Why have you wrapped this display dialog command in a tell
  5948. statement? You don't get or send any data from FM Pro in the display
  5949. dialog command. This could be part of your problem right here.
  5950.  
  5951. >Eudora sort mail script:
  5952. >---------
  5953. >tell application "Eudora1.4.2"
  5954.  
  5955.     You could change this to: tell mail folder "" of application ... It
  5956. would make all of your future references a little shorter.
  5957.  
  5958. >    --activate  -- disabled, faster if script is in foreground ?
  5959. >    set n to number of message of mailbox "In" of mail folder ""
  5960. >    set i to 1 -- use separate counter since the pointer should only
  5961. >               -- increase if we don't move a message
  5962. >    repeat with j from 1 to n
  5963.  
  5964.     Since you don't use j within the loop at all a slightly more
  5965. efficient loop call might be "repeat n times".
  5966.  
  5967. >        try
  5968. >            set itsTo to field "To" of message i of mailbox "In" of --
  5969. >            mail folder ""
  5970. >        on error
  5971. >            set itsTo to ""
  5972. >        end try
  5973. >        try
  5974. >            set itsCC to field "cc" of message i of mailbox "In" of --
  5975. >            mail folder ""
  5976. >        on error
  5977. >            set itsCC to ""
  5978. >        end try
  5979. >        try
  5980. >            set itssender to field "sender" of message i of mailbox --
  5981. >            "In" of mail folder ""
  5982. >        on error
  5983. >            set itssender to ""
  5984. >        end try
  5985. >        set itsTo to itsTo & return & itsCC & return & itssender
  5986.  
  5987.     How about changing this series of commands to something like this:
  5988.  
  5989.         if exists message i of mailbox "In" of mail folder ""
  5990.            tell message i of mailbox "In" of mail folder ""
  5991.               set itsTo to field "To" & return & field "cc" & return --
  5992.                   & field "sender"
  5993.            end tell
  5994.         end if
  5995.  
  5996.     I don't think you really need all of those try statements, but I
  5997. could be wrong. If I'm right then what I wrote makes that whole thing
  5998. just a little bit shorter. ;->
  5999.  
  6000. >        if itsTo contains "applescript%" or itsTo contains --
  6001. >        "MACSCRPT%" then
  6002. >            move message i of mailbox "In" of mail folder "" --
  6003. >            inserthere end of mailbox "AppleScript" of mail folder ""
  6004. >        else if itsTo contains "YACHT-L%" then
  6005. >            move message i of mailbox "In" of mail folder "" --
  6006. >            inserthere end of mailbox "yacht and sail" of mail folder ""
  6007. >        else if itsTo contains "FMPRO-L%" then
  6008. >            move message i of mailbox "In" of mail folder "" --
  6009. >            inserthere end of mailbox "FileMaker Pro" of mail folder ""
  6010. >        else if itsTo contains "info-mac digest" then
  6011. >            move message i of mailbox "In" of mail folder "" --
  6012. >            inserthere end of mailbox "info-mac digest" of mail folder ""
  6013. >        else
  6014. >            set i to i + 1 -- no message moved, increase pointer
  6015. >            if i > number of message of mailbox "In" of mail folder --
  6016. >            "" then exit repeat -- moved all messages already
  6017. >        end if
  6018. >    end repeat
  6019. >end tell
  6020. >play sound "doorbell"
  6021.  
  6022.     I don't really know of a better way to handle the actual filtering.
  6023. Of course, I would kill for a good "case of" statement in AppleScript.
  6024. They have one in UserLand Frontier.
  6025.  
  6026. -Hades
  6027. =========================================================================
  6028. Date:         Fri, 15 Apr 1994 13:13:28 -0400
  6029. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6030. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6031. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  6032. Subject:      What's with quiting?
  6033.  
  6034. Is there something non-obvious thing about how you are supposed to tell an
  6035. application to quit?  Every time I try to do something like:
  6036.  
  6037.   tell application "Scriptable Text Editor"
  6038.       quit
  6039.   end tell
  6040.  
  6041. I get an error reading:, "some parameter wasn't understood", highlighting
  6042. the quit command.  What's wrong with this?
  6043.  
  6044. Steve
  6045.  
  6046. ---------------------
  6047.  jonke@gsfc.nasa.gov
  6048. ---------------------
  6049. =========================================================================
  6050. Date:         Fri, 15 Apr 1994 13:24:20 -0400
  6051. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6052. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6053. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  6054. Subject:      Putting stuff on the clipboard?
  6055.  
  6056. Simple question, is there any way to place text (or whatever) into the
  6057. clipboard?
  6058.  
  6059. Steve
  6060.  
  6061. ---------------------
  6062.  jonke@gsfc.nasa.gov
  6063. ---------------------
  6064. =========================================================================
  6065. Date:         Fri, 15 Apr 1994 12:44:29 -0500
  6066. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6067. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6068. From:         Fred Terry <pfterry@LKS.CSI.COM>
  6069. Subject:      Re: Putting stuff on the clipboard?
  6070. In-Reply-To:  Your message of "Fri, 15 Apr 94 13:24:20 EDT"
  6071.  
  6072. >Simple question, is there any way to place text (or whatever) into the
  6073. >clipboard?
  6074.  
  6075. Jon's commands?
  6076. =========================================================================
  6077. Date:         Fri, 15 Apr 1994 13:08:09 -0600
  6078. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6079. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6080. From:         Chuck Shotton <cshotton@OAC.HSC.UTH.TMC.EDU>
  6081. Subject:      AppleScript shared lib on PPC
  6082.  
  6083. I've just run into an interesting programming problem regarding AppleScript
  6084. on PPC and need some advice. MacHTTP has the optional ability to execute
  6085. AppleScripts, but doesn't require that AppleScript be installed to run.
  6086. However, if the AppleScript shared library isn't present on a Power Mac,
  6087. the following message spews out:
  6088.  
  6089. "The Application 'MacHTTP 1.2.4' could not be run because 'AppleScriptLib'
  6090. could not be found"
  6091.  
  6092. First, is there an alternate source for the AppleScriptLib, other than the
  6093. AppleScript distribution itself? And, does anyone know Apple's policy
  6094. regarding the distribution of this library?
  6095.  
  6096. Second, is there some overlooked programming technique that I should use on
  6097. the PPC to indicate that a particular shared libary isn't mandatory and the
  6098. program should be allowed to run if it isn't present?
  6099.  
  6100. Thanks,
  6101. Chuck
  6102.  
  6103. p.s. Please CC: me on any responses.
  6104.  
  6105. --_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_\_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  6106. Chuck Shotton                             \
  6107. Assistant Director, Academic Computing     \   "Shut up and eat your
  6108. U. of Texas Health Science Center Houston   \    vegetables!!!"
  6109. cshotton@oac.hsc.uth.tmc.edu  (713) 794-5650 \
  6110. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\-_-_-_-_-_-_-_-_-_-_-_-_-
  6111. =========================================================================
  6112. Date:         Fri, 15 Apr 1994 14:27:41 -0500
  6113. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6114. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6115. From:         The Goddess Lives <marilyn@MONROE.TEMPLE.EDU>
  6116. Subject:      Re: Menu Events, Menu Grabber,
  6117.  
  6118.         [ Techy stuff well taken, hence not reproduced ]
  6119.         [ Apologies for others, for leadin 'em away from ASing]
  6120.  
  6121.  Fella, if you're so cool, you can do without the pseudonym.
  6122.  
  6123. Listen buddy, if your'e trying to start a flamewar, lets do it
  6124. on an another platform, lets keep this forum just for ASing
  6125. the way the manufacturer intended it to be used. :)
  6126.  
  6127. I 'am still amazed that your'e flaming me just for pointing
  6128. out the bug in your program. I take it sportingly when userz
  6129. point out bugz in my programz. Infact 'am better I fix 'em up.
  6130.  
  6131. Have a good weeknd.
  6132.  
  6133. --
  6134. Marilyn Monroe
  6135. Bring Back the Goddess Inc.
  6136.  
  6137. Don't tell me later that folks in Temple think the same way
  6138. folks in Heaven do.
  6139. =========================================================================
  6140. Date:         Fri, 15 Apr 1994 14:42:37 -0400
  6141. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6142. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6143. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  6144. Subject:      Re: What's with quiting?
  6145. In-Reply-To:  <no.id> from "Stephen Jonke" at Apr 15, 94 01:13:28 pm
  6146.  
  6147. --Stephen Jonke wrote:
  6148. >
  6149. >  tell application "Scriptable Text Editor"
  6150. >      quit
  6151. >  end tell
  6152. >
  6153. >I get an error reading:, "some parameter wasn't understood", highlighting
  6154. >the quit command.  What's wrong with this?
  6155.  
  6156.     You might need to say, "quit saving no" to get the STE to quit from
  6157. a tell statement. Personally, as long as you know that there are no
  6158. windows open, or anything that might need to be saved you could just
  6159. issue a: quit application "Scriptable Text Editor". This command has the
  6160. advantage that it will work with any running application.
  6161.  
  6162. -Hades
  6163. =========================================================================
  6164. Date:         Fri, 15 Apr 1994 14:44:52 -0400
  6165. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6166. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6167. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  6168. Subject:      Re: Menu Events, Menu Grabber,
  6169. In-Reply-To:  <no.id> from "The Goddess Lives" at Apr 15, 94 02:27:41 pm
  6170.  
  6171. --The Goddess Lives wrote:
  6172. >
  6173. >Listen buddy, if your'e trying to start a flamewar, lets do it
  6174. >on an another platform, lets keep this forum just for ASing
  6175. >the way the manufacturer intended it to be used. :)
  6176.  
  6177.     One small point. This mainling list exists for the discussion of any
  6178. and all OSA or AppleScript compliant scripting systems. Not just
  6179. AppleScript. As it happens, AppleScript is currently the most talked
  6180. about environment on the list.
  6181.  
  6182. -Hades
  6183. =========================================================================
  6184. Date:         Fri, 15 Apr 1994 13:52:10 -0500
  6185. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6186. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6187. From:         Fred Terry <pfterry@LKS.CSI.COM>
  6188. Subject:      Re: Menu Events, Menu Grabber,
  6189. In-Reply-To:  Your message of "Fri, 15 Apr 94 10:56:00 EDT"
  6190.  
  6191. Ross,
  6192.  
  6193. >Fella, if you're so cool, you can do without the pseudonym.
  6194. >
  6195. >Ross Brown - AWOL Software Productions
  6196. >PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  6197. >publisher of AWOL Utilities - "the best deal in freeware!"
  6198. >ab026@freenet.carleton.ca
  6199.  
  6200. I appreciate the time that you took to answer this person's questions. And I'm
  6201. also sensitive to the tone he/she used. Please, please don't respond to
  6202. his/her latest message in the list. I've sent a message to the individual
  6203. asking them to cease the flammage, and I'd appreciate your help (even though
  6204. your comment isn't so bad and I "slightly" agree with you). I really don't
  6205. want this stuff in the list. Period.
  6206.  
  6207. Thanks for your understanding.
  6208.  
  6209. pf
  6210.  
  6211.  
  6212. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6213. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  6214. =========================================================================
  6215. Date:         Fri, 15 Apr 1994 15:54:19 -0400
  6216. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6217. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6218. From:         Stephen Jonke <jonke@KONG.GSFC.NASA.GOV>
  6219. Subject:      [ignore] A bit of a test
  6220.  
  6221. Sorry if this annoys anybody....  I've been having problems with bounced
  6222. messages on this list (namely, my admin complains about bounced
  6223. acknowledgement messages), so I set my options to "NOACK" and am hoping
  6224. that I won't receive an "ACK".  The last time I tried this it didn't seem
  6225. to stop the "ACK"'s  :)
  6226.  
  6227. Actually, I suppose I could throw in a question - is there any way in
  6228. AppleScript to pause for x seconds (or milliseconds or whatever)?  Using
  6229. repeat loops seems to be rather unreliable.  Sometimes an empty loop for
  6230. 10000 times finishes almost immediately, other times it takes several
  6231. seconds!
  6232.  
  6233. Steve
  6234.  
  6235. ---------------------
  6236.  jonke@gsfc.nasa.gov
  6237. ---------------------
  6238. =========================================================================
  6239. Date:         Fri, 15 Apr 1994 15:17:20 -0500
  6240. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6241. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6242. From:         Igor Livshits <igorl@UIUC.EDU>
  6243. Subject:      Re: Putting stuff on the clipboard?
  6244.  
  6245. >>Simple question, is there any way to place text (or whatever) into the
  6246. >>clipboard?
  6247. >
  6248.  
  6249. Menu Events 1.1.1 -- you could send a fake copy command (perhaps preceded
  6250. with a select all command].
  6251.  
  6252. Cheers, Igor
  6253.  
  6254. _____
  6255. NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424;  Have a Coke and a smile :)
  6256. =========================================================================
  6257. Date:         Fri, 15 Apr 1994 16:50:29 -0500
  6258. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6259. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6260. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  6261. Subject:      FrontMost Crash
  6262.  
  6263. Hello,
  6264.  
  6265.  A while ago I posted a problem I was having with having a client
  6266. AppleScript tell FrontMost to do something. ( The full posting is at the
  6267. bottom of this e-mail. ) I also posted this AppleLink and got a speedy
  6268. reply from Uncle Dave of SDU. He was able to reproduce the problem and said
  6269. it was a bug. Below is his work around:
  6270.  
  6271. ===========================================
  6272. SDU's reply
  6273. =================================================
  6274.  
  6275. Hello:
  6276.  
  6277. We are working on the problem.
  6278.  
  6279. Please use this code in the meantime:
  6280.  
  6281. on AddFile(theFile)
  6282.    open window "Files To Get"
  6283.    tell window "Files to Get"
  6284.    copy the contents of listbox "File List" to stuff
  6285.    copy stuff & {theFile} to the contents of listbox "File List"
  6286.    end tell
  6287. end AddFile
  6288.  
  6289. Thanks,
  6290. Uncle Dave
  6291.  
  6292. Author: LEE.BUCK
  6293.  
  6294. =================================================
  6295. Original post
  6296. =================================================
  6297.  
  6298. Hello,
  6299.  
  6300.  I am writing a simple test client-server system where the client is a an
  6301. AppleScript script and the server is a FaceSpan ( nee FrontMost ) created
  6302. app.  The problem I am having is that when the FaceSpan command "make new
  6303. listbox item" ( see below ) gets executed, my Mac hangs ( cursor freezes  )
  6304. or drops down into MacsBug. It is not consistent.
  6305.  
  6306.  I have tried all kinds of things:
  6307.  
  6308.     I am only using the extensions I need.
  6309.     I have tried  saving the FaceSpan app as a complete app or a mini app.
  6310.     I wrapped a try-error handler around the troublemaker line.
  6311.  
  6312. When I call the "AddFile"  handler from within the Server app itself it
  6313. works fine, but when I call the handler from a client script,  I get the
  6314. hang.
  6315.  
  6316.  I don't know what to try next.  Anybody out there experience this type of
  6317. problem? I have not seen too much discussion of FrontMost on this list. I
  6318. hope it is OK to ask this type of question here.
  6319.  
  6320. ========
  6321.  
  6322. Here are the scripts that make up the system. I cut out all the other
  6323. stuff. This code still bombs. By the way I am running System 7 Pro on an
  6324. fx.
  6325.  
  6326.  Thanks.
  6327.  
  6328.  
  6329. Client Script
  6330. -----------------
  6331. tell application "Server"
  6332.         activate
  6333.         AddFile("junk")
  6334.         activate current application
  6335. end tell
  6336.  
  6337.  
  6338. "Server Script" in FrontMost Project Script
  6339. ---------------------------------------------------------
  6340. on AddFile(theFile)
  6341.       open window "Files To Get"
  6342.       set theListBox to listbox "File List" of window "Files To Get"
  6343.      -- I have a valid reference here. I checked using display dialog.
  6344.       make new listbox item at end of theListBox with properties
  6345. {contents:"junk"}
  6346. end AddFile
  6347.  
  6348.  
  6349. --
  6350. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  6351. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  6352. sshws@convx1.lerc.nasa.gov
  6353. AppleLink: SCHILLING.H
  6354. =========================================================================
  6355. Date:         Fri, 15 Apr 1994 18:28:30 -0600
  6356. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6357. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6358. From:         Charles Wiltgen <cwiltgen@MCS.COM>
  6359. Subject:      Re: Menu Events, Menu Grabber,
  6360.  
  6361. Ross,
  6362.  
  6363. >I appreciate the time that you took to answer this person's questions. And I'm
  6364. >also sensitive to the tone he/she used. Please, please don't respond to
  6365. >his/her latest message in the list. I've sent a message to the individual
  6366. >asking them to cease the flammage, and I'd appreciate your help (even though
  6367. >your comment isn't so bad and I "slightly" agree with you). I really don't
  6368. >want this stuff in the list. Period.
  6369.  
  6370. Fred took the words right out of my mouth.  I think a lot of people
  6371. appreciate the time you've put into your software, Ms. Monroe
  6372. notwithstanding.
  6373.  
  6374.  
  6375. --
  6376. Charles Wiltgen
  6377. MCSnet/Chicago
  6378. cwiltgen@mcs.net
  6379. =========================================================================
  6380. Date:         Fri, 15 Apr 1994 18:42:46 -0700
  6381. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6382. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6383. From:         "Allan R. Crump" <jhhw@CRL.COM>
  6384. Subject:      where is app?
  6385.  
  6386. Ok, here's my problem.
  6387. *If I create an applet which can be run on several different machines,
  6388. every time that I install the applet and run it the first time it asks:
  6389.  
  6390. "Where is application Filemaker Pro 2.0?"
  6391.  
  6392. * If I setup a variable as follows:
  6393. copy localHardDrive & "Applications:Filemaker:Filemaker Pro 2.0" to appname
  6394. tell application appname
  6395. ...
  6396. end tell
  6397. *But the applet freaks out because it cannot resolve the events it's
  6398. supposed to send to appname.  Does anyone have any suggestions on this
  6399. one ??
  6400.  
  6401. You'd have my undying gratitude.
  6402. Allan Crump
  6403. =========================================================================
  6404. Date:         Fri, 15 Apr 1994 22:47:02 +0000
  6405. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6406. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6407. From:         Paul Sperry <sperry@MATH.SCAROLINA.EDU>
  6408. Subject:      Re: What's with quiting?
  6409.  
  6410. At  1:13 PM 4/15/94 -0400. Stephen Jonke wrote:
  6411. >Is there something non-obvious thing about how you are supposed to tell an
  6412. >application to quit?  Every time I try to do something like:
  6413. >
  6414. >  tell application "Scriptable Text Editor"
  6415. >      quit
  6416. >  end tell
  6417. >
  6418. >I get an error reading:, "some parameter wasn't understood", highlighting
  6419. >the quit command.  What's wrong with this?
  6420. >
  6421. >Steve
  6422. >
  6423. >---------------------
  6424. > jonke@gsfc.nasa.gov
  6425. >---------------------
  6426.  
  6427.    Steve is not hallucinating, I have the same problem and not just with
  6428. quit.  It occurs, as near as I can tell, completely at random: sometimes a
  6429. script works, sometimes the same one doesn't. I have tried the various
  6430. options for quit, removing all extensions except AppleScript, removing
  6431. RamDoubler and a different machine.  No luck.  I've taken to try-ing quit
  6432. at the beginning of every script to see whether it will work this time.
  6433.  
  6434.    Sometimes quitting AppleScript Editor ( I'm using 1.0 ) and then
  6435. relaunching it will fix things; sometimes even multiple machine restarts is
  6436. no help.
  6437.  
  6438. P.L.Sperry                                       sperry@math.scarolina.edu
  6439. Department of Mathematics
  6440. University of South Carolina
  6441. Columbia,SC
  6442. =========================================================================
  6443. Date:         Sat, 16 Apr 1994 11:06:13 EDT
  6444. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6445. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6446. From:         Jeff Beebe <jeffbb@AOL.COM>
  6447. Subject:      Re: What's with quiting?
  6448.  
  6449. You can be sure whether a parameter is necessary by checking the dictionary
  6450. of STE (use open dictionary in Script Editor File command).
  6451.    Your best bet before quitting is make sure all your windows are closed,
  6452. and the STE close command does have the "saving yes/no/ask" optional
  6453. parameter.
  6454. =========================================================================
  6455. Date:         Sat, 16 Apr 1994 11:11:11 EDT
  6456. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6457. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6458. From:         Jeff Beebe <jeffbb@AOL.COM>
  6459. Subject:      Re: Putting stuff on the clipboard?
  6460.  
  6461. There is an OSAX called clipboard which uses the commands "clipboard info",
  6462. "set the clipboard to", and "the clipboard" which will do what we want.
  6463.     I just got it this week from a Gannett colleage, but its from Apple, by
  6464. Jon Pugh.
  6465. =========================================================================
  6466. Date:         Sat, 16 Apr 1994 15:01:31 -0400
  6467. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6468. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6469. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  6470. Subject:      AppleScript Language Guide (Addison-Wesley)
  6471.  
  6472. As excellent as this is, I was suprised to notice the following
  6473. (sorry if this is a FAQ-ish well known thing, I just got here):
  6474.  
  6475. (*
  6476. --from AppleScript Language Guide (AW), p181
  6477. 31449600 / years
  6478. -- result: 1
  6479.  
  6480. -- actual result: Execution Error
  6481. --  The variable years is not defined
  6482. *)
  6483.  
  6484. 31449600 / weeks --result: 52.0
  6485. days * 365 -- result: 31536000
  6486. copy days * 365 to mostYears
  6487. 31449600 / mostYears -- result: 0.9972602739726
  6488. =========================================================================
  6489. Date:         Sat, 16 Apr 1994 15:04:36 -0400
  6490. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6491. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6492. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  6493. Subject:      Another dumb dates FAQ?
  6494.  
  6495. I give up. (The following script explains the problem)
  6496. (*Failing to find a definition of the domain or range
  6497. of AppleScript dates, I was curious to see if it
  6498. handled Pope Gregory's missing days. I never found
  6499. out, as something chokes in the following script
  6500. about 1902. Yet I can represent earlier dates that seem
  6501. to work ok, for example the next line entered as: date "1/1/1700" *)
  6502. date "Friday, January 1, 1700 12:00:00 AM"
  6503. -- result: as converted in the script, underlined (meaning??)
  6504.  
  6505. copy 0 to lastlen
  6506. set jan1 to date "Saturday, January 1, 1994 12:00:00 AM"
  6507. copy jan1 to nxtyr
  6508. repeat with yr from 1905 to 1000 by -1
  6509.         set year of jan1 to yr
  6510.         display dialog jan1 as string -- just to watch;wish it would take dates
  6511.         set year of nxtyr to yr + 1
  6512.         -- the next line fails for 1902 or any year earlier
  6513.         set len to (nxtyr - jan1) / days -- result: execution error
  6514.         --the result of a numeric operation was too large
  6515.         if 1 < lastlen - len then -- leap years are ok
  6516.                 display dialog (yr as string) & "=" & len & "," & yr + 1 & "=" 
  6517. &
  6518.  lastlen
  6519.         end if
  6520.         copy len to lastlen
  6521. end repeat
  6522.  
  6523. Make sense to anyone??
  6524. =========================================================================
  6525. Date:         Sun, 17 Apr 1994 17:07:03 -0700
  6526. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6527. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6528. From:         Jon Pugh <jonpugh@NETCOM.COM>
  6529. Subject:      Jon's Commands 1.1
  6530.  
  6531. I just sent Jon's Commands 1.1 to Info-Mac.  It should appear on Sumex
  6532. shortly and assuming Fred isn't asleep, on gaea shortly thereafter.
  6533.  
  6534. Version 1.1 fixes a bug in "screen list" on machines without color, a bug
  6535. in "set clipboard to", passes a clean PC register in "execute FKEY",
  6536. changes the return result of finder selection to aliases, makes all the
  6537. file commands take lists and strings, and adds copyFile and walk folders,
  6538. plus coercions from strings to file specifications.
  6539.  
  6540. The "walk folders" command is a good one.  It takes a list of files and
  6541. folders and a script object.  It then recurses through all the files and
  6542. folders and for each file in these folders, it sends an open message to the
  6543. script provided.  This makes it really simple to write file processing
  6544. scripts.  Here's an example:
  6545.  
  6546. script foo
  6547.   on open(f)
  6548.     -- do your stuff to file f here
  6549.   end open
  6550. end script
  6551.  
  6552. on open(theFiles)
  6553.   walk folders theFiles with script foo
  6554. end open
  6555.  
  6556. That's all there is to it!  I think it's cool!
  6557.  
  6558. Check it out at an archive near you (and if there isn't one, MOVE!).
  6559.  
  6560. Jon
  6561. =========================================================================
  6562. Date:         Sun, 17 Apr 1994 17:06:42 -0700
  6563. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6564. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6565. From:         Jon Pugh <jonpugh@NETCOM.COM>
  6566. Subject:      Add Dictionary Script
  6567.  
  6568. Here's a nifty script I wrote some time ago and forgot to mention.
  6569.  
  6570. If you use Leonard's OSA Menu extension and the AppleScript Script Editor
  6571. and any number of scriptable programs or scripting additions, then this
  6572. script is a "must have!"  When you drop an app or osax onto this script
  6573. (saved as an application), it adds that application or scripting addition
  6574. to the Script Editor's OSA Menu.
  6575.  
  6576. Now, when you are in the Script Editor and say "Hmmm, what was the syntax
  6577. of that command in that super-nifty osax Jon's Commands?" ;) ;) you can
  6578. simply pull down the menu and the dictionary will open.  Pretty damn handy!
  6579.  
  6580. This includes a run handler at the end which uses Jon's Commands to make
  6581. this work from the Finder's OSA Menu.  If you don't want that or don't use
  6582. Jon's Commands, remove that handler.  If you want it to work with the
  6583. scriptable Finder, change the run handler to:
  6584.         tell app "Finder"
  6585.           set x to selection
  6586.         end tell
  6587.         open x
  6588.  
  6589. Have fun!
  6590.  
  6591. Jon
  6592.  
  6593. ----------8x-------------8x-----------------8x---------------
  6594.  
  6595. script bob
  6596.         property dictFile : ""
  6597.         tell application "Script Editor"
  6598.                 open {dictFile}
  6599.         end tell
  6600. end script
  6601.  
  6602. on open (theFiles)
  6603.         repeat with f in theFiles
  6604.                 set s to bob
  6605.                 set s's dictFile to (f as alias)
  6606.                 set t to f as string
  6607.                 set AppleScript's text item delimiters to {":"}
  6608.                 set fName to last text item of t
  6609.                 set folderName to ""
  6610.                 repeat with i from 1 to (number of text items of t) - 1
  6611.                         set folderName to folderName & text item i of t & ":=
  6612. "
  6613.                 end repeat
  6614.                 set AppleScript's text item delimiters to {}
  6615.                 set additionPath to (path to extensions folder as string) --
  6616.                         & "Scripting Additions:"
  6617.                 if folderName =82 additionPath then
  6618.                         set fName to space & fName & " Dictionary"
  6619.                 else
  6620.                         set fName to fName & " Dictionary"
  6621.                 end if
  6622.                 if number of characters of fName > 31 then
  6623.                         display dialog "Shorten this name, please." --
  6624.                                 default answer fName
  6625.                         set fName to text returned of the result
  6626.                         if number of characters of fName > 31 then
  6627.                                 set fName to characters 1 through 31 of fNam=
  6628. e
  6629.                         end if
  6630.                 end if
  6631.                 set p to (path to system folder as string) & --
  6632.                         "Scripts:Script Editor Scripts:" & fName
  6633.                 --display dialog p
  6634.                 store script s in file p replacing yes
  6635.         end repeat
  6636. end open
  6637.  
  6638. on run
  6639.         open (finder selection)
  6640. end run
  6641. =========================================================================
  6642. Date:         Mon, 18 Apr 1994 08:50:45 +0100
  6643. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6644. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6645. From:         Johan Solve <johan.solve@ITN.HH.SE>
  6646. Subject:      Re: AppleScript speed (or slowness)
  6647.  
  6648.  --Brian Hughes wrote:
  6649.  
  6650. >     I don't know that much about scripting Eudora, but I do have a few
  6651. > comments and ideas on your scripts...
  6652. > >tell application "FileMaker Pro"
  6653. > >    display dialog "Median:   " & median & " kr" & return & return --
  6654. > >        & "Lower quarter:   " & undkvart & " kr" & return --
  6655. > >        & "Upper quarter:     " & uppkvart & " kr" buttons {"OK"} default --
  6656. > >        button "OK"
  6657. > >end tell
  6658. >
  6659. >     Why have you wrapped this display dialog command in a tell
  6660. > statement? You don't get or send any data from FM Pro in the display
  6661. > dialog command. This could be part of your problem right here.
  6662.  
  6663. Without the tell statement, I would expect the dialog to show up in the
  6664. script's layer instead of the FileMaker layer, resulting in an unwanted
  6665. notification. Am I right? (easy to try, haven't done it yet)
  6666.  
  6667. >
  6668. > >Eudora sort mail script:
  6669. > >---------
  6670. > >tell application "Eudora1.4.2"
  6671. >
  6672. >     You could change this to: tell mail folder "" of application ... It
  6673. > would make all of your future references a little shorter.
  6674.  
  6675. This won't let me redirect mail to different mail folders (which I do in
  6676. the actual script I use now)
  6677.  
  6678.  
  6679. > >    --activate  -- disabled, faster if script is in foreground ?
  6680. > >    set n to number of message of mailbox "In" of mail folder ""
  6681. > >    set i to 1 -- use separate counter since the pointer should only
  6682. > >               -- increase if we don't move a message
  6683. > >    repeat with j from 1 to n
  6684. >
  6685. >     Since you don't use j within the loop at all a slightly more
  6686. > efficient loop call might be "repeat n times".
  6687.  
  6688. Ah well, a leftover from a previous version of the script where j was used.
  6689. Good point!
  6690.  
  6691.  
  6692. > >   [long script snippet deleted]
  6693. > >
  6694. >         if exists message i of mailbox "In" of mail folder ""
  6695. >            tell message i of mailbox "In" of mail folder ""
  6696. >               set itsTo to field "To" & return & field "cc" & return --
  6697. >                   & field "sender"
  6698. >            end tell
  6699. >         end if
  6700. >
  6701. >     I don't think you really need all of those try statements, but I
  6702. > could be wrong. If I'm right then what I wrote makes that whole thing
  6703. > just a little bit shorter. ;->
  6704.  
  6705. Shorter, yes, but will it work? What happens if there is no cc field in the
  6706. header? I'd expect an error.
  6707. Is it possibel to fetch the entire header record in one single call, and
  6708. extract the different fields within the script? This must be MUCH faster.
  6709.  
  6710. Thanks for comments!
  6711.  
  6712. _______________________________________________________________________
  6713.           "
  6714.    JOHAN SOLVE                   Department of Science and Technology
  6715.    <johan.solve@itn.hh.se>       Halmstad University, Sweden
  6716. =========================================================================
  6717. Date:         Mon, 18 Apr 1994 11:17:45 -0400
  6718. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6719. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6720. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  6721. Subject:      Re: AppleScript speed (or slowness)
  6722. In-Reply-To:  <no.id> from "Johan Solve" at Apr 18, 94 08:50:45 am
  6723.  
  6724. --Johan Solve wrote:
  6725. >
  6726. >Without the tell statement, I would expect the dialog to show up in the
  6727. >script's layer instead of the FileMaker layer, resulting in an unwanted
  6728. >notification. Am I right? (easy to try, haven't done it yet)
  6729.  
  6730.     I don't know about where it will display, but what you said sounds
  6731. right. I thought you were running this as an Applet with FM Pro in the
  6732. background, not the foreground.
  6733.  
  6734. >> >tell application "Eudora1.4.2"
  6735. >>
  6736. >>     You could change this to: tell mail folder "" of application ... It
  6737. >> would make all of your future references a little shorter.
  6738. >
  6739. >This won't let me redirect mail to different mail folders (which I do in
  6740. >the actual script I use now)
  6741.  
  6742.     Good point.
  6743.  
  6744. >>         if exists message i of mailbox "In" of mail folder ""
  6745. >>            tell message i of mailbox "In" of mail folder ""
  6746. >>               set itsTo to field "To" & return & field "cc" & return --
  6747. >>                   & field "sender"
  6748. >>            end tell
  6749. >>         end if
  6750. >Shorter, yes, but will it work? What happens if there is no cc field in the
  6751. >header? I'd expect an error.
  6752.  
  6753.     Well, I really don't know because I don't use Eudora. But I would
  6754. expect if to return nothing.
  6755.  
  6756. >Is it possibel to fetch the entire header record in one single call, and
  6757. >extract the different fields within the script? This must be MUCH faster.
  6758.  
  6759.     Again, I really don't know but I'm kind of surprised that the header
  6760. fields of a message aren't just listed as elements of the message class
  6761. as defined in the Eudora dictionary. I would think this is a much more
  6762. efficient way to handle it. This is also how the mail program that I do
  6763. use works.
  6764.  
  6765. -Hades
  6766. =========================================================================
  6767. Date:         Mon, 18 Apr 1994 08:42:50 -0700
  6768. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6769. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6770. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  6771. Subject:      Re: AppleScript speed (or slowness)
  6772.  
  6773. At 11:58 4/15/94 -0400, Brian V. Hughes wrote:
  6774. >>Eudora sort mail script:
  6775. >>---------
  6776. >>tell application "Eudora1.4.2"
  6777. >
  6778. >    You could change this to: tell mail folder "" of application ... It
  6779. >would make all of your future references a little shorter.
  6780.  
  6781. Not here on my machine..."mail folder" isn't understood as being something
  6782. special until after something has told AppleScript to deal with application
  6783. "Eudora1.4.2".  This sort of pattern works, though:
  6784.  
  6785. tell application "Eudora 2.0.2"
  6786.     tell message -1 of mailbox "In" of mail folder ""
  6787.         get field "From"
  6788.     end tell
  6789. end tell
  6790.  
  6791. But it may not be relevant to Johan's needs, anyhow.
  6792.    --John
  6793.  
  6794. --
  6795. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  6796. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  6797. =========================================================================
  6798. Date:         Mon, 18 Apr 1994 09:18:28 -0700
  6799. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6800. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6801. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  6802. Subject:      Re: AppleScript speed (or slowness)
  6803.  
  6804. At 11:17 4/18/94 -0400, Brian V. Hughes wrote:
  6805. >    Again, I really don't know but I'm kind of surprised that the header
  6806. >fields of a message aren't just listed as elements of the message class
  6807. >as defined in the Eudora dictionary. I would think this is a much more
  6808. >efficient way to handle it. This is also how the mail program that I do
  6809. >use works.
  6810.  
  6811.    Perhaps the header fields are handled as they are because the set of all
  6812. headers is unknown (unbounded?  whatever).  There are a few expected ones,
  6813. and there can be any other ones that some foolish mailer wants to put in.
  6814. If I want, I can have header
  6815.     X-Today-John-Weighs: nnn
  6816. although I shouldn't.
  6817.  
  6818.    --John
  6819.  
  6820. --
  6821. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  6822. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  6823. =========================================================================
  6824. Date:         Mon, 18 Apr 1994 12:32:34 -0400
  6825. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6826. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6827. From:         George Entenman <ge@MCNC.ORG>
  6828. Subject:      How to distribute AppleScript?
  6829.  
  6830. If a company develops an application that uses AppleScript, it is possible
  6831. to distribute a runtime version of AppleScript with the application?
  6832. Does the company doing this have to pay to redistribute it?
  6833.  
  6834. Thanks.
  6835.  
  6836.                           George
  6837.  
  6838. P.S. I read the articles called "AppleScript Distribution License = $500",
  6839. but they don't seem to answer this question.
  6840.  
  6841. ########################################################################
  6842. # George Entenman (ge@mcnc.org)                                        #
  6843. # MCNC Center for Microelectronics Systems Technologies                #
  6844. # P.O. Box 12889                                                       #
  6845. # Research Triangle Park, NC 27709-2889           Besta e tu'          #
  6846. # 919/248-1953 (voice)                            Se voce' na~o viver  #
  6847. # 919/248-1455 (FAX)                              neste mundo....      #
  6848. ########################################################################
  6849. =========================================================================
  6850. Date:         Mon, 18 Apr 1994 13:21:08 -0400
  6851. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6852. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6853. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  6854. Subject:      Re: AppleScript speed (or slowness)
  6855. In-Reply-To:  <no.id> from "John W. Baxter" at Apr 18, 94 09:18:28 am
  6856.  
  6857. --John W. Baxter wrote:
  6858. >
  6859. >   Perhaps the header fields are handled as they are because the set of all
  6860. >headers is unknown (unbounded?  whatever).  There are a few expected ones,
  6861. >and there can be any other ones that some foolish mailer wants to put in.
  6862. >If I want, I can have header
  6863. >    X-Today-John-Weighs: nnn
  6864. >although I shouldn't.
  6865.  
  6866.     Ok, now I feel like an idiot. Especially since I always append a
  6867. custom header to all of my mail messages. You would think I would know
  6868. that this is the case. Thanks for clearing this up John.
  6869.  
  6870. -Hades
  6871. =========================================================================
  6872. Date:         Mon, 18 Apr 1994 14:33:08 -0500
  6873. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6874. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6875. From:         Fred Terry <pfterry@LKS.CSI.COM>
  6876. Subject:      new files on gaea 4/18
  6877.  
  6878. Hi everyone,
  6879. You will find a couple of new files on gaea and a update.
  6880.  
  6881. John Baxter has contributed a couple of modern memory manager files for use
  6882. with Frontier and AppleScript. Both the osax and the UCMD detect whether the
  6883. "Modern Memory Manager" is active, returning true if it is, false if it isn't.
  6884.  Useful if one has some applications which can't tolerate the new Memory
  6885. Manager. Source code included, along with a dumb sample AppleScript script,
  6886. and the needed glue table for Frontier.
  6887.  
  6888. You will also find a new version of Acid Jazz (1.2). The URLs are
  6889.  
  6890. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/AcidJazz1.2v1.sit.hqx
  6891. ftp://gaea.kgs.ukans.edu/applescript/osaxen/modernMMosax.sit.hqx
  6892. ftp://gaea.kgs.ukans.ed/frontier/UCMDs/modernMMucmd.sit.hqx
  6893.  
  6894. Enjoy,
  6895.  
  6896. pf
  6897.  
  6898. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  6899. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  6900. =========================================================================
  6901. Date:         Mon, 18 Apr 1994 16:49:19 -0400
  6902. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6903. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6904. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  6905. Subject:      menubar scripting addition?
  6906.  
  6907. Does anybody know of an AppleScript scripting addition that allows a script
  6908. to display some text in the menubar (ala SuperClock)?  Something along the
  6909. lines of "display dialog", but with the destination in the menubar instead
  6910. of a dialog box.  An additional feature would be to have the text
  6911. clickable, like a button, so that the script could do something when the
  6912. text was clicked.  Any ideas?  I could probably do something similar with
  6913. Frontmost, but that seems a bit heavyweight for what I have in mind and the
  6914. text would be displayed in a window, not the menubar.  Thanks,
  6915.  
  6916.                                 -Steve.
  6917.  
  6918.  
  6919. +--------------------------------------------------------------+
  6920. | Steven L. Rohall                                             |
  6921. |                            ________ _        ______  ______  |
  6922. | 55 Walkers Brook Drive        /    / \      /     / /     /  |
  6923. | Reading, MA 01867-3297       /    /___\    /______ /         |
  6924. | Tel: (617)942-2000          /    /     \         //          |
  6925. | Fax: (617)942-7100         /    /       \/______//______/    |
  6926. | slrohall@tasc.com                                            |
  6927. | (MIME-conformant mail welcome.)                              |
  6928. +--------------------------------------------------------------+
  6929. =========================================================================
  6930. Date:         Mon, 18 Apr 1994 18:17:18 -0600
  6931. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6932. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6933. From:         Charles Wiltgen <cwiltgen@MCS.COM>
  6934. Subject:      Re: Off-hook OSAX
  6935.  
  6936. Hello,
  6937.  
  6938. Is there an OSAX that will allow me to tell if my line is off the hook?
  6939.  
  6940. I'd like to create a script that will occasionally get my mail, but I want
  6941. it to make sure I'm not calling in at the moment.
  6942.  
  6943. I'm also worried about it trying to start it someone's leaving a message on
  6944. my answering machine.
  6945.  
  6946.  
  6947. --
  6948. Charles Wiltgen
  6949. MCSnet/Chicago
  6950. cwiltgen@mcs.net
  6951. =========================================================================
  6952. Date:         Mon, 18 Apr 1994 22:18:24 -0700
  6953. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6954. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  6955. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  6956. Subject:      Re: Another dumb dates FAQ?
  6957.  
  6958. >I give up. (The following script explains the problem)
  6959. >(*Failing to find a definition of the domain or range
  6960. >of AppleScript dates, I was curious to see if it
  6961. >handled Pope Gregory's missing days. I never found
  6962. >out, as something chokes in the following script
  6963. >about 1902.
  6964.  
  6965. >copy 0 to lastlen
  6966. >set jan1 to date "Saturday, January 1, 1994 12:00:00 AM"
  6967. >copy jan1 to nxtyr
  6968. >repeat with yr from 1905 to 1000 by -1
  6969. >        set year of jan1 to yr
  6970. >        display dialog jan1 as string -- just to watch;wish it would take 
  6971. dates
  6972. >        set year of nxtyr to yr + 1
  6973. >        -- the next line fails for 1902 or any year earlier
  6974. >        set len to (nxtyr - jan1) / days -- result: execution error
  6975. >        --the result of a numeric operation was too large
  6976. >        if 1 < lastlen - len then -- leap years are ok
  6977. >                display dialog (yr as string) & "=" & len & "," & yr + 1 & "="
  6978. >&
  6979. > lastlen
  6980. >        end if
  6981. >        copy len to lastlen
  6982. >end repeat
  6983. >
  6984. >Make sense to anyone??
  6985.  
  6986. Well, it makes sense.  That is, it is an error whose presence makes sense.
  6987. The AppleScript date type is represented by the Macintosh LongDateTime
  6988. type, which is a 64-bit integer (formerly the SANE comp type, now the new
  6989. "wide" type, a struct with a high-order signed long and a low order
  6990. unsigned long).
  6991.  
  6992. Zero is the same place as the Mac clock's zero:  Jan 1, 1904 at 00:00:00
  6993. (and the low word of the LongDateTime is equal to the Mac clock throughout
  6994. the range of the Mac clock).  One second before 0 is of course -1.  Which
  6995. is 64 1 bits.  With a little careless code, dividing the difference of two
  6996. of those by a small number would produce a number which might seem very
  6997. large.
  6998.  
  6999. It appears that the following variation solves your (really, AppleScript's)
  7000. problem:
  7001.  
  7002. copy 0 to lastlen
  7003. set jan1 to date "Saturday, January 1, 1994 00:00:00"
  7004. copy jan1 to nxtyr
  7005. repeat with yr from 1905 to 1000 by -1
  7006.     set year of jan1 to yr
  7007.     display dialog jan1 as string -- just to watch;wish it would take dates
  7008.     set year of nxtyr to yr + 1
  7009.     -- the next line fails for 1902 or any year earlier
  7010.     if yr > 1903 then  -- JWB: the conditional and the else part are added
  7011.         set len to (nxtyr - jan1) / days
  7012.     else
  7013.         set len to (jan1 - nxtyr) / days
  7014.     end if
  7015.     if 1 < lastlen - len then -- leap years are ok
  7016.         display dialog (yr as string) & "=" & len & "," & yr + 1 & "=" & 
  7017. lastlen
  7018.     end if
  7019.     copy len to lastlen
  7020. end repeat
  7021.  
  7022. --
  7023. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7024. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7025. =========================================================================
  7026. Date:         Tue, 19 Apr 1994 09:16:10 EDT
  7027. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7028. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7029. From:         Jeff Beebe <jeffbb@AOL.COM>
  7030. Subject:      Radio Buttons
  7031.  
  7032. When I build a dialog box in ResEdit with radio buttons, and then run it with
  7033. run dialog etc .... I can't get the radio button to stay on, whether enabled
  7034. or not in the DITL. How-to, anybody?
  7035.     Also, how can I get a script to access fastest the DLOG? Can I load it as
  7036. a resource in the script itself and mark it to preload? How to call? "run
  7037. dialog name of me?" Anybody done this, tried that?
  7038.    'Preshate help.
  7039. =========================================================================
  7040. Date:         Tue, 19 Apr 1994 09:38:24 -0400
  7041. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7042. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7043. From:         "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
  7044. Subject:      Re: How to distribute AppleScript?
  7045.  
  7046. >If a company develops an application that uses AppleScript, it is possible
  7047. >to distribute a runtime version of AppleScript with the application?
  7048. >Does the company doing this have to pay to redistribute it?
  7049. >
  7050. >Thanks.
  7051. >
  7052. >                          George
  7053. >
  7054. >P.S. I read the articles called "AppleScript Distribution License = $500",
  7055. >but they don't seem to answer this question.
  7056.  
  7057. There is a distribution license that comes with the AppleScript Scripter's
  7058. Toolkit.  The license allows for the distribution of the AppleScript and
  7059. Frontmost Runtime software (AS extension, Frontmost extension) with any
  7060. scripts that you develop.  The toolkit costs about $140. I found out from
  7061. Gary Little, the AppleScript Product Manager, that the $500 licensing fee
  7062. is required if you want to bundle additional AS-related software from Apple
  7063. (Script Editor, Scriptable Text Editor, etc.).
  7064.  
  7065. Lee.
  7066.  
  7067. Lee K. Hoong
  7068. Dept. of Chemistry, Emory University
  7069. Internet: lhoong@unix.cc.emory.edu  |  America On-line: LHOONG
  7070. Disclaimer: I speak for myself only, not for Emory University
  7071. =========================================================================
  7072. Date:         Tue, 19 Apr 1994 15:37:18 EDT
  7073. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7074. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7075. From:         "William J. Jamison" <jami1@AOL.COM>
  7076. Subject:      Re: menubar scripting addition?
  7077.  
  7078. I use the Tempo II+ externals, "Message" and "GetWindowName" to display
  7079. window names in the menu bar, works great for the purposes of eliminating
  7080. some guesswork in QK2. Thus somebody at Affinity (shameless plug) might be
  7081. able to point you in the right direction. :D
  7082.  
  7083. Jami1
  7084. =========================================================================
  7085. Date:         Wed, 20 Apr 1994 01:52:38 -0400
  7086. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7087. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7088. From:         Ross Brown <ab026@FREENET.CARLETON.CA>
  7089. Subject:      Menu Events / Menu Grabber 1.1.2 at gaea
  7090.  
  7091. Hello, scripters.  Just a note to let you know that Menu Events
  7092. and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
  7093. incoming directory, on their way to applescript/addons.
  7094.  
  7095. Version 1.1.2 adds some nifty new stuff to the package:
  7096.  
  7097. 1.  Menu Events makes System-7-savvy non-scriptable applications
  7098.     recordable as well as scriptable.  Turn on recording, press
  7099.     Caps Lock, and your menu selections will be recorded.
  7100.  
  7101. 2.  Menu Events and Menu Grabber now support the use of modifier
  7102.     keys (Shift, Control, Option, Command) with menu selections.
  7103.  
  7104. 3.  You can script Query Menu and Select Menu Item commands to
  7105.     applications such as BBEdit and ClarisWorks which use non-
  7106.     standard 'MDEF's... if you dare.  :-)  This used to be an error.
  7107.  
  7108. These programs have extensive documentation which should handle
  7109. most questions you may have.  And it's still free.  Enjoy...
  7110.  
  7111.  
  7112. --
  7113. Ross Brown - AWOL Software Productions
  7114. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  7115. publisher of AWOL Utilities - "the best deal in freeware!"
  7116. ab026@freenet.carleton.ca
  7117. =========================================================================
  7118. Date:         Tue, 19 Apr 1994 22:59:54 -0700
  7119. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7120. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7121. From:         Jon Pugh <jonpugh@NETCOM.COM>
  7122. Subject:      Re: AppleScript speed (or slowness)
  7123.  
  7124. >My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  7125. >itself (I still use 1.0, waiting for the Goodman update...).
  7126. >I'm running a IIvx with 7.1.
  7127. >
  7128. >What are your opinions or suggestions when it comes to AppleScript speed
  7129. >when cooperating with applications? Is it a general rule to bring
  7130. >AppleEvent calls to a minimum? For example, the sort mail script could
  7131. >perhaps fetch the entire header in one AE call (don't know if Eudora
  7132. >supports this), and process the information further within AppleScript. Am
  7133. >I correct?
  7134.  
  7135. The problem is not AppleEvents, although they are the manifestation as far
  7136. as AppleScript is concerned.  The real culprit is the Macintosh OS, in
  7137. particular, the Process Manager.  It is the bottleneck for context
  7138. switches, of which two are necessary for each AppleEvent.  Mind you, the
  7139. Process Manager is one of those places on the Macintosh that if you, as a
  7140. software engineer, touch it, you will go immediately insane.  It has
  7141. happened to several people already.
  7142.  
  7143. Basically, the Process Manager is the heart of the hack known as
  7144. MultiFinder.  It is crufty and ugly 68K assembly code.  It is emulated on
  7145. the PowerPC.  It is the embodiment of pure evil.  ;)
  7146.  
  7147. So, since AppleEvents is inherently an interprocess communication system,
  7148. it has to deal implicitly with the process manager.  If the process manager
  7149. is ever improved so that background apps get more time more regularly, then
  7150. I strongly suspect that AppleScript will see a marked improvement.
  7151.  
  7152. I also believe that this pokieness extends itself to Frontier too.
  7153.  
  7154. So, the short answer is Yes.  Keep your AppleEvent transactions to a
  7155. minimum and tranfer larger chunks of data.  Activate your programs to get
  7156. them into the front and dictating the time slices.
  7157.  
  7158. There ought to be a way to take a script and run it in the target
  7159. application's process via an osax which uses an OSASendProc to convert all
  7160. the AE into SendToSelf addressing.  That would short circuit the process
  7161. manager.  Hmm, I'll have to look into that.
  7162.  
  7163. Jon
  7164. =========================================================================
  7165. Date:         Wed, 20 Apr 1994 09:56:40 EDT
  7166. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7167. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7168. From:         "Lynn W. Becker II" <lbecker@HP8C.NRL.NAVY.MIL>
  7169. Subject:      Ugrading from the Tao Book AScript
  7170. In-Reply-To:  from "Automatic digest processor" at Apr 20, 94 12:05 (midnight)
  7171.  
  7172. Is there an "upgrader" available to upgrade the version of
  7173. AS that came with the Tao of Applescript?
  7174.  
  7175. thanks!
  7176.  
  7177. Lynn B.
  7178. =========================================================================
  7179. Date:         Wed, 20 Apr 1994 10:26:48 -0400
  7180. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7181. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7182. From:         Jim Russell <jimr@ACCESS.DIGEX.NET>
  7183. Subject:      Re: AppleScript speed (or slowness)
  7184. In-Reply-To:  Your message of "Tue,
  7185.               19 Apr 1994 22:59:54 PDT." <199404200743.AA29489@nfs1.digex.net>
  7186.  
  7187. I started some scripts to time various AppleScript operations on my Power
  7188. Book 140. The timing script calibrates itself to factor out the overhead of
  7189. the call to the operation being timed, which, on the PowerBook amounted to a
  7190. large 18ms or so.  I tried it last night at home on a PowerMac 7100/66, and
  7191. was crushed to see that the overhead there rose to about 19ms.  So far,
  7192. AppleScript seems to take times about equivalent to the timings I used to get
  7193. for HyperTalk.
  7194. =========================================================================
  7195. Date:         Wed, 20 Apr 1994 10:37:23 -0400
  7196. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7197. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7198. From:         Barry Wolman <Barry_Wolman@TRANSARC.COM>
  7199. Subject:      AppleScript Versions
  7200.  
  7201. I just joined this group, so this might be a FAQ ...
  7202.  
  7203. How does the version of AppleScript that comes with System 7 Pro
  7204. compare with the version in the separate AppleScript product and the
  7205. versions distributed with the AppleScript books.  Does the version
  7206. bundled with System 7 Pro include the same documentation and extras
  7207. as the separate product?
  7208.  
  7209. Thanks,
  7210.  
  7211. Barry
  7212.  
  7213. ----------------------------------------------------
  7214. Barry Wolman                    barry@transarc.com
  7215. Transarc Corporation            412/338-4364 (voice)
  7216. 707 Grant Street                412/338-4404 (fax)
  7217. Pittsburgh, PA 15219
  7218. =========================================================================
  7219. Date:         Wed, 20 Apr 1994 10:33:54 CDT
  7220. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7221. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7222. From:         Taylor Leaming H3-283 <leamingt@TOBOR.SPS.MOT.COM>
  7223. Subject:      Re: Ugrading from the Tao Book AScript
  7224.  
  7225. > Is there an "upgrader" available to upgrade the version of
  7226. > AS that came with the Tao of Applescript?
  7227.  
  7228. I called the publisher of "Tao" about a month ago, and at that time
  7229. they had no update available, or plans for one.
  7230.  
  7231. You might try giving them a call and see if that has changed.
  7232.  
  7233. -Taylor
  7234. =========================================================================
  7235. Date:         Wed, 20 Apr 1994 08:49:36 -0800
  7236. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7237. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7238. From:         Leonard Rosenthol <leonardr@NETCOM.COM>
  7239. Subject:      Re: AppleScript speed (or slowness)
  7240.  
  7241. >[Jon's rantings about the process manager removed to save space ;]
  7242. >
  7243. >So, since AppleEvents is inherently an interprocess communication system,
  7244. >it has to deal implicitly with the process manager.  If the process manager
  7245. >is ever improved so that background apps get more time more regularly, then
  7246. >I strongly suspect that AppleScript will see a marked improvement.
  7247. >
  7248.         This whole "situation" will improve SIGNIFICANTLY with the next
  7249. major release of System Software (ie. 7.5) which includes an improved
  7250. Process Manager that interacts much better with AppleScript and AE's...
  7251.  
  7252.  
  7253. Leonard
  7254.  
  7255. -----------------------------------------------------------------------------
  7256. Leonard Rosenthol                       Internet:       leonardr@netcom.com
  7257. Director of Advanced Technology         AppleLink:      MACgician
  7258. Aladdin Systems, Inc.                   GEnie:          MACgician
  7259. =========================================================================
  7260. Date:         Wed, 20 Apr 1994 13:03:23 -0400
  7261. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7262. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7263. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  7264. Subject:      Can't get script to run!! Why?
  7265.  
  7266. Help! This is driving me nuts!
  7267.  
  7268. I *just* got version 1.1 of the AppleScript Developer's Kit from
  7269. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  7270. Started" manual)!
  7271.  
  7272. They say to go into the Script Editor, enter "RECORD" mode, and then
  7273. fire up the Scriptable Text Editor, type some text, change the style.
  7274. Then, stop recording.
  7275.  
  7276. Now. I have a simple script that looks like this:
  7277.  
  7278.         tell application "Scriptable Text Editor"
  7279.                 activate
  7280.                 set selection to "Welcome to AppleScript"
  7281.                 select word 3 of document 1
  7282.                 set style of selection to italic
  7283.         end tell
  7284.  
  7285. I save it as an Application called "My First Script", then I quit the
  7286. editor. Both editors, in fact.
  7287.  
  7288. Now. Whenever I double-click on the "My First Script" application, it
  7289. brings up the title box, and I click on "Run". It then immediately
  7290. quits, doing nothing.
  7291.  
  7292. What gives? This is a simple application -- and it doesn't work!!!
  7293. When I re-load it into the editor, and click on "run", it works fine.
  7294.  
  7295. HELP!!! It didn't take long for me to get frustrated with this!!
  7296.  
  7297. \marc
  7298.  
  7299. --
  7300. Marc N. Cannava                         |  Tigers are nimble,
  7301. Technical Staff, The MITRE Corporation  |  And light on their toes,
  7302. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  7303. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  7304. =========================================================================
  7305. Date:         Wed, 20 Apr 1994 13:06:55 -0500
  7306. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7307. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7308. From:         Fred Terry <pfterry@LKS.CSI.COM>
  7309. Subject:      new versions of Menu Events and Jon's Commands
  7310.  
  7311. Hi everyone,
  7312.  
  7313. I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
  7314. the appropriate directories. Jon's already let everyone know about the new
  7315. features in his osax. Among other things, Ross Brown has added recordability
  7316. and support for non-standard menu definitions to Menu Events. You can find out
  7317. more about it from the file
  7318.  
  7319. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  7320.  
  7321. You will find the updated versions in
  7322.  
  7323. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  7324. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
  7325. ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
  7326.  
  7327. Enjoy.
  7328.  
  7329. pf
  7330.  
  7331. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7332. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  7333. =========================================================================
  7334. Date:         Wed, 20 Apr 1994 12:03:27 -0700
  7335. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7336. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7337. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7338. Subject:      Re: Can't get script to run!! Why?
  7339.  
  7340. At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  7341. >Now. I have a simple script that looks like this:
  7342. >
  7343. >        tell application "Scriptable Text Editor"
  7344. >                activate
  7345. >                set selection to "Welcome to AppleScript"
  7346. >                select word 3 of document 1
  7347. >                set style of selection to italic
  7348. >        end tell
  7349. >
  7350. >I save it as an Application called "My First Script", then I quit the
  7351. >editor. Both editors, in fact.
  7352. >
  7353. >Now. Whenever I double-click on the "My First Script" application, it
  7354. >brings up the title box, and I click on "Run". It then immediately
  7355. >quits, doing nothing.
  7356.  
  7357.  
  7358. Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  7359. etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  7360.  
  7361. I'd suspect something in your installation.  What does this variation do?
  7362.  
  7363. 1.  By hand, start Scriptable Text Editor.  You should have a blank
  7364. untiltled document (choose New from the File menu if that isn't true).
  7365.  
  7366. 2.  Double click on your saved script application.
  7367.  
  7368.  
  7369. If that works, now try quitting Scriptable Text Editor, and once again
  7370. double-clicking the saved script application.
  7371.  
  7372. --John
  7373.  
  7374. --
  7375. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7376. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7377. =========================================================================
  7378. Date:         Wed, 20 Apr 1994 13:13:33 -0800
  7379. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7380. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7381. From:         Mike Cohen <isis@NETCOM.COM>
  7382. Subject:      Re: AppleScript speed (or slowness)
  7383.  
  7384. At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
  7385. (explanation of process manager deleted)
  7386. >
  7387. >There ought to be a way to take a script and run it in the target
  7388. >application's process via an osax which uses an OSASendProc to convert all
  7389. >the AE into SendToSelf addressing.  That would short circuit the process
  7390. >manager.  Hmm, I'll have to look into that.
  7391. >
  7392. This would speed things up dramatically. Several of the enhacements in
  7393. Frontier such system event handlers make a very big difference in the
  7394. speed. Sending more data in each event also helps a lot.
  7395.  
  7396. Right now I'm fighting with Excel trying to speed up data transfers from
  7397. another application. I found that setting a cell at a time (which is the
  7398. easiest way in UserTalk) is painfully slow, but creating an array and
  7399. sending it to a range is a very big improvement. As for my own application
  7400. (which transfers data to/from a Newton), I was able to improve things a lot
  7401. by having a single event do something like "get next n records" rather than
  7402. getting a single record per event.
  7403.  
  7404. _______________________________________________________________
  7405. Mike Cohen
  7406. ISIS International   | "Software that means business"
  7407. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  7408. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  7409. =========================================================================
  7410. Date:         Wed, 20 Apr 1994 16:16:26 -0400
  7411. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7412. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7413. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  7414. Subject:      Re: Can't get script to run!! Why?
  7415. In-Reply-To:  <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
  7416.               Apr 20, 94 12:03:27 pm
  7417.  
  7418. >
  7419. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  7420. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  7421. >
  7422. > I'd suspect something in your installation.  What does this variation do?
  7423. >
  7424.  
  7425. Stranger and stranger:
  7426.  
  7427.         - If I record my actions and let the Script Editor build
  7428.           the script for me, then immediately save the script as an
  7429.           application, the resulting application doesn't work. By
  7430.           this, I mean that when I double-click on the application,
  7431.           it launches, asks me if I want to run it, then it just
  7432.           quits.
  7433.  
  7434.  
  7435.         - If, however, I record actions and then modify the script
  7436.           somehow (even just type a "space" into the editor box),
  7437.           then save it as an application, it works!!
  7438.  
  7439. I don't get it. I've installed the s/w on three machines now, and they
  7440. all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
  7441. Mac IIsi.)
  7442.  
  7443. Any ideas??
  7444.  
  7445. \marc
  7446.  
  7447. --
  7448. Marc N. Cannava                         |  Tigers are nimble,
  7449. Technical Staff, The MITRE Corporation  |  And light on their toes,
  7450. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  7451. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  7452. =========================================================================
  7453. Date:         Wed, 20 Apr 1994 16:34:28 -0400
  7454. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7455. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7456. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  7457. Subject:      Re: Can't get script to run!! Why?
  7458. In-Reply-To:  <199404201947.PAA24091@mbunix.mitre.org> from "John W. Baxter" at
  7459.               Apr 20, 94 12:03:27 pm
  7460.  
  7461. >
  7462. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  7463. > >Now. I have a simple script that looks like this:
  7464. > >
  7465. > >        tell application "Scriptable Text Editor"
  7466. > >                activate
  7467. > >                set selection to "Welcome to AppleScript"
  7468. > >                select word 3 of document 1
  7469. > >                set style of selection to italic
  7470. > >        end tell
  7471. > >
  7472. > >I save it as an Application called "My First Script", then I quit the
  7473. > >editor. Both editors, in fact.
  7474. > >
  7475. > >Now. Whenever I double-click on the "My First Script" application, it
  7476. > >brings up the title box, and I click on "Run". It then immediately
  7477. > >quits, doing nothing.
  7478. >
  7479.  
  7480. Even stranger::
  7481.  
  7482. If I take the script that I recorded, select it, copy it, paste it
  7483. into new script, then run the new script as an application, it works!
  7484. The original stil doesn't work.
  7485.  
  7486. My thoughts are that for some reason, I can't run a "recorded" script.
  7487. Any ideas why that might be so? Is there any difference between a
  7488. "recorded" script and one that I just typed in directly?
  7489.  
  7490. I'm so confused..
  7491.  
  7492. \marc
  7493.  
  7494. --
  7495. Marc N. Cannava                         |  Tigers are nimble,
  7496. Technical Staff, The MITRE Corporation  |  And light on their toes,
  7497. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  7498. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  7499. =========================================================================
  7500. Date:         Wed, 20 Apr 1994 14:24:54 -0700
  7501. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7502. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7503. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7504. Subject:      Re: Can't get script to run!! Why?
  7505.  
  7506. At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
  7507. >        - If I record my actions and let the Script Editor build
  7508. >          the script for me, then immediately save the script as an
  7509. >          application, the resulting application doesn't work. By
  7510. >          this, I mean that when I double-click on the application,
  7511. >          it launches, asks me if I want to run it, then it just
  7512. >          quits.
  7513. >
  7514. >
  7515. >        - If, however, I record actions and then modify the script
  7516. >          somehow (even just type a "space" into the editor box),
  7517. >          then save it as an application, it works!!
  7518.  
  7519.  
  7520. Hmmm...making any change and then saving causes the script to be compiled
  7521. again.  Simply changing it probably doesn't.  Something about the
  7522. compilation fixes something (quite likely the form in which
  7523.  
  7524.     application "Scriptable Text Editor"
  7525.  
  7526. is stored in the compiled script.)
  7527.  
  7528. I don't think it *should* work that way.  [I had in fact changed the
  7529. recorded script slightly...when I follow your recipe correctly, I get the
  7530. same effect you do.]
  7531.  
  7532.    --John
  7533.  
  7534. --
  7535. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7536. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7537. =========================================================================
  7538. Date:         Wed, 20 Apr 1994 10:41:02 PDT
  7539. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7540. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7541. From:         "David Rogers,Eng" <david.rogers@ALDUS.COM>
  7542. Organization: Aldus Corporation, Seattle, WA
  7543. Subject:      Re: Can't get script to run!! Why?
  7544.  
  7545. Marc,
  7546.  
  7547. The script you sent works fine on my machine and I am using AS 1.1.  Two
  7548. things: 1) Make sure you check the syntax of the script before saving.  2)
  7549. When you save as an application check the "Never Show Startup Screen"
  7550. button.
  7551.  
  7552. Regards,
  7553. David
  7554. ---------------------------------------------------------------------------
  7555. david.rogers@aldus.com    -========)--  Frodo Lives
  7556. --(========-
  7557. ---------------------------------------------------------------------------
  7558. _______________________________________________________________________________
  7559. From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
  7560. Subject: Can't get script to run!! Why?
  7561. To: David Rogers,Eng
  7562.  
  7563. Help! This is driving me nuts!
  7564.  
  7565. I *just* got version 1.1 of the AppleScript Developer's Kit from
  7566. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  7567. Started" manual)!
  7568.  
  7569. They say to go into the Script Editor, enter "RECORD" mode, and then
  7570. fire up the Scriptable Text Editor, type some text, change the style.
  7571. Then, stop recording.
  7572.  
  7573. Now. I have a simple script that looks like this:
  7574.  
  7575.         tell application "Scriptable Text Editor"
  7576.                 activate
  7577.                 set selection to "Welcome to AppleScript"
  7578.                 select word 3 of document 1
  7579.                 set style of selection to italic
  7580.         end tell
  7581.  
  7582. I save it as an Application called "My First Script", then I quit the
  7583. editor. Both editors, in fact.
  7584.  
  7585. Now. Whenever I double-click on the "My First Script" application, it
  7586. brings up the title box, and I click on "Run". It then immediately
  7587. quits, doing nothing.
  7588.  
  7589. What gives? This is a simple application -- and it doesn't work!!!
  7590. When I re-load it into the editor, and click on "run", it works fine.
  7591.  
  7592. HELP!!! It didn't take long for me to get frustrated with this!!
  7593.  
  7594. \marc
  7595.  
  7596. --
  7597. Marc N. Cannava                         |  Tigers are nimble,
  7598. Technical Staff, The MITRE Corporation  |  And light on their toes,
  7599. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  7600. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  7601. =========================================================================
  7602. Date:         Wed, 20 Apr 1994 20:39:07 -0700
  7603. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7604. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7605. From:         "Allan R. Crump" <jhhw@CRL.COM>
  7606. Subject:      Re: Can't get script to run!! Why?
  7607. In-Reply-To:  <199404201925.AA28312@mail.crl.com>
  7608.  
  7609. Why not try copying the script into Script Editor and running it from
  7610. there ?  You could probably trap it with some dialog messages and see
  7611. what it's doing...
  7612. (just my 2cents worth)
  7613.  
  7614.  
  7615. On Wed, 20 Apr 1994, John W. Baxter wrote:
  7616.  
  7617. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  7618. > >Now. I have a simple script that looks like this:
  7619. > >
  7620. > >        tell application "Scriptable Text Editor"
  7621. > >                activate
  7622. > >                set selection to "Welcome to AppleScript"
  7623. > >                select word 3 of document 1
  7624. > >                set style of selection to italic
  7625. > >        end tell
  7626. > >
  7627. > >I save it as an Application called "My First Script", then I quit the
  7628. > >editor. Both editors, in fact.
  7629. > >
  7630. > >Now. Whenever I double-click on the "My First Script" application, it
  7631. > >brings up the title box, and I click on "Run". It then immediately
  7632. > >quits, doing nothing.
  7633. >
  7634. >
  7635. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  7636. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  7637. >
  7638. > I'd suspect something in your installation.  What does this variation do?
  7639. >
  7640. > 1.  By hand, start Scriptable Text Editor.  You should have a blank
  7641. > untiltled document (choose New from the File menu if that isn't true).
  7642. >
  7643. > 2.  Double click on your saved script application.
  7644. >
  7645. >
  7646. > If that works, now try quitting Scriptable Text Editor, and once again
  7647. > double-clicking the saved script application.
  7648. >
  7649. > --John
  7650. >
  7651. > --
  7652. > jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7653. > finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7654. >
  7655. =========================================================================
  7656. Date:         Thu, 21 Apr 1994 12:03:10 +0800
  7657. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7658. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7659. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  7660. Subject:      Re: AppleScript speed (or slowness)
  7661.  
  7662. >        This whole "situation" will improve SIGNIFICANTLY with the next
  7663. >major release of System Software (ie. 7.5) which includes an improved
  7664. >Process Manager that interacts much better with AppleScript and AE's...
  7665.  
  7666. Speaking of speeding things up.  I now have my PPC card for my Q610 and
  7667. Stuffit Expander is Oh So Slow compared to before.  Does it make Native
  7668. versions arrive any faster if I send dollars :-)  And how much is Stuffit
  7669. Deluxe?
  7670.  
  7671. Cheers,
  7672. Craig
  7673.  
  7674. --
  7675. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  7676. The University of Western Australia      or 380 3860 Email for FAX Number
  7677. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  7678. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  7679. =========================================================================
  7680. Date:         Wed, 20 Apr 1994 13:24:39 -0700
  7681. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7682. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  7683. Comments:     Warning -- original Sender: tag was rogerk@UNPC.QUEERNET.ORG
  7684. From:         Automatic digest processor <LISTSERV@DARTCMS1.DARTMOUTH.EDU>
  7685. Subject:      MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  7686.  
  7687. There are 17 messages totalling 586 lines in this issue.
  7688.  
  7689. Topics of the day:
  7690.  
  7691.   1. Menu Events / Menu Grabber 1.1.2 at gaea
  7692.   2. AppleScript speed (or slowness) (5)
  7693.   3. Ugrading from the Tao Book AScript (2)
  7694.   4. AppleScript Versions
  7695.   5. Can't get script to run!! Why? (7)
  7696.   6. new versions of Menu Events and Jon's Commands
  7697.  
  7698. ----------------------------------------------------------------------
  7699.  
  7700. Date:    Wed, 20 Apr 1994 01:52:38 -0400
  7701. From:    Ross Brown <ab026@FREENET.CARLETON.CA>
  7702. Subject: Menu Events / Menu Grabber 1.1.2 at gaea
  7703.  
  7704. Hello, scripters.  Just a note to let you know that Menu Events
  7705. and Menu Grabber version 1.1.2 are at gaea.kgs.ukans.edu in the
  7706. incoming directory, on their way to applescript/addons.
  7707.  
  7708. Version 1.1.2 adds some nifty new stuff to the package:
  7709.  
  7710. 1.  Menu Events makes System-7-savvy non-scriptable applications
  7711.     recordable as well as scriptable.  Turn on recording, press
  7712.     Caps Lock, and your menu selections will be recorded.
  7713.  
  7714. 2.  Menu Events and Menu Grabber now support the use of modifier
  7715.     keys (Shift, Control, Option, Command) with menu selections.
  7716.  
  7717. 3.  You can script Query Menu and Select Menu Item commands to
  7718.     applications such as BBEdit and ClarisWorks which use non-
  7719.     standard 'MDEF's... if you dare.  :-)  This used to be an error.
  7720.  
  7721. These programs have extensive documentation which should handle
  7722. most questions you may have.  And it's still free.  Enjoy...
  7723.  
  7724.  
  7725. --
  7726. Ross Brown - AWOL Software Productions
  7727. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  7728. publisher of AWOL Utilities - "the best deal in freeware!"
  7729. ab026@freenet.carleton.ca
  7730.  
  7731. ------------------------------
  7732.  
  7733. Date:    Tue, 19 Apr 1994 22:59:54 -0700
  7734. From:    Jon Pugh <jonpugh@NETCOM.COM>
  7735. Subject: Re: AppleScript speed (or slowness)
  7736.  
  7737. >My guess is that the bottleneck is AppleEvents, or possibly AppleScript
  7738. >itself (I still use 1.0, waiting for the Goodman update...).
  7739. >I'm running a IIvx with 7.1.
  7740. >
  7741. >What are your opinions or suggestions when it comes to AppleScript speed
  7742. >when cooperating with applications? Is it a general rule to bring
  7743. >AppleEvent calls to a minimum? For example, the sort mail script could
  7744. >perhaps fetch the entire header in one AE call (don't know if Eudora
  7745. >supports this), and process the information further within AppleScript. Am
  7746. >I correct?
  7747.  
  7748. The problem is not AppleEvents, although they are the manifestation as far
  7749. as AppleScript is concerned.  The real culprit is the Macintosh OS, in
  7750. particular, the Process Manager.  It is the bottleneck for context
  7751. switches, of which two are necessary for each AppleEvent.  Mind you, the
  7752. Process Manager is one of those places on the Macintosh that if you, as a
  7753. software engineer, touch it, you will go immediately insane.  It has
  7754. happened to several people already.
  7755.  
  7756. Basically, the Process Manager is the heart of the hack known as
  7757. MultiFinder.  It is crufty and ugly 68K assembly code.  It is emulated on
  7758. the PowerPC.  It is the embodiment of pure evil.  ;)
  7759.  
  7760. So, since AppleEvents is inherently an interprocess communication system,
  7761. it has to deal implicitly with the process manager.  If the process manager
  7762. is ever improved so that background apps get more time more regularly, then
  7763. I strongly suspect that AppleScript will see a marked improvement.
  7764.  
  7765. I also believe that this pokieness extends itself to Frontier too.
  7766.  
  7767. So, the short answer is Yes.  Keep your AppleEvent transactions to a
  7768. minimum and tranfer larger chunks of data.  Activate your programs to get
  7769. them into the front and dictating the time slices.
  7770.  
  7771. There ought to be a way to take a script and run it in the target
  7772. application's process via an osax which uses an OSASendProc to convert all
  7773. the AE into SendToSelf addressing.  That would short circuit the process
  7774. manager.  Hmm, I'll have to look into that.
  7775.  
  7776. Jon
  7777.  
  7778. ------------------------------
  7779.  
  7780. Date:    Wed, 20 Apr 1994 09:56:40 EDT
  7781. From:    "Lynn W. Becker II" <lbecker@HP8C.NRL.NAVY.MIL>
  7782. Subject: Ugrading from the Tao Book AScript
  7783.  
  7784. Is there an "upgrader" available to upgrade the version of
  7785. AS that came with the Tao of Applescript?
  7786.  
  7787. thanks!
  7788.  
  7789. Lynn B.
  7790.  
  7791. ------------------------------
  7792.  
  7793. Date:    Wed, 20 Apr 1994 10:26:48 -0400
  7794. From:    Jim Russell <jimr@ACCESS.DIGEX.NET>
  7795. Subject: Re: AppleScript speed (or slowness)
  7796.  
  7797. I started some scripts to time various AppleScript operations on my Power
  7798. Book 140. The timing script calibrates itself to factor out the overhead of
  7799. the call to the operation being timed, which, on the PowerBook amounted to a
  7800. large 18ms or so.  I tried it last night at home on a PowerMac 7100/66, and
  7801. was crushed to see that the overhead there rose to about 19ms.  So far,
  7802. AppleScript seems to take times about equivalent to the timings I used to get
  7803. for HyperTalk.
  7804.  
  7805. ------------------------------
  7806.  
  7807. Date:    Wed, 20 Apr 1994 10:37:23 -0400
  7808. From:    Barry Wolman <Barry_Wolman@TRANSARC.COM>
  7809. Subject: AppleScript Versions
  7810.  
  7811. I just joined this group, so this might be a FAQ ...
  7812.  
  7813. How does the version of AppleScript that comes with System 7 Pro
  7814. compare with the version in the separate AppleScript product and the
  7815. versions distributed with the AppleScript books.  Does the version
  7816. bundled with System 7 Pro include the same documentation and extras
  7817. as the separate product?
  7818.  
  7819. Thanks,
  7820.  
  7821. Barry
  7822.  
  7823. ----------------------------------------------------
  7824. Barry Wolman                    barry@transarc.com
  7825. Transarc Corporation            412/338-4364 (voice)
  7826. 707 Grant Street                412/338-4404 (fax)
  7827. Pittsburgh, PA 15219
  7828.  
  7829. ------------------------------
  7830.  
  7831. Date:    Wed, 20 Apr 1994 10:33:54 CDT
  7832. From:    Taylor Leaming H3-283 <leamingt@TOBOR.SPS.MOT.COM>
  7833. Subject: Re: Ugrading from the Tao Book AScript
  7834.  
  7835. > Is there an "upgrader" available to upgrade the version of
  7836. > AS that came with the Tao of Applescript?
  7837.  
  7838. I called the publisher of "Tao" about a month ago, and at that time
  7839. they had no update available, or plans for one.
  7840.  
  7841. You might try giving them a call and see if that has changed.
  7842.  
  7843. -Taylor
  7844.  
  7845. ------------------------------
  7846.  
  7847. Date:    Wed, 20 Apr 1994 08:49:36 -0800
  7848. From:    Leonard Rosenthol <leonardr@NETCOM.COM>
  7849. Subject: Re: AppleScript speed (or slowness)
  7850.  
  7851. >[Jon's rantings about the process manager removed to save space ;]
  7852. >
  7853. >So, since AppleEvents is inherently an interprocess communication system,
  7854. >it has to deal implicitly with the process manager.  If the process manager
  7855. >is ever improved so that background apps get more time more regularly, then
  7856. >I strongly suspect that AppleScript will see a marked improvement.
  7857. >
  7858.         This whole "situation" will improve SIGNIFICANTLY with the next
  7859. major release of System Software (ie. 7.5) which includes an improved
  7860. Process Manager that interacts much better with AppleScript and AE's...
  7861.  
  7862.  
  7863. Leonard
  7864.  
  7865. -----------------------------------------------------------------------------
  7866. Leonard Rosenthol                       Internet:       leonardr@netcom.com
  7867. Director of Advanced Technology         AppleLink:      MACgician
  7868. Aladdin Systems, Inc.                   GEnie:          MACgician
  7869.  
  7870. ------------------------------
  7871.  
  7872. Date:    Wed, 20 Apr 1994 13:03:23 -0400
  7873. From:    "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  7874. Subject: Can't get script to run!! Why?
  7875.  
  7876. Help! This is driving me nuts!
  7877.  
  7878. I *just* got version 1.1 of the AppleScript Developer's Kit from
  7879. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  7880. Started" manual)!
  7881.  
  7882. They say to go into the Script Editor, enter "RECORD" mode, and then
  7883. fire up the Scriptable Text Editor, type some text, change the style.
  7884. Then, stop recording.
  7885.  
  7886. Now. I have a simple script that looks like this:
  7887.  
  7888.         tell application "Scriptable Text Editor"
  7889.                 activate
  7890.                 set selection to "Welcome to AppleScript"
  7891.                 select word 3 of document 1
  7892.                 set style of selection to italic
  7893.         end tell
  7894.  
  7895. I save it as an Application called "My First Script", then I quit the
  7896. editor. Both editors, in fact.
  7897.  
  7898. Now. Whenever I double-click on the "My First Script" application, it
  7899. brings up the title box, and I click on "Run". It then immediately
  7900. quits, doing nothing.
  7901.  
  7902. What gives? This is a simple application -- and it doesn't work!!!
  7903. When I re-load it into the editor, and click on "run", it works fine.
  7904.  
  7905. HELP!!! It didn't take long for me to get frustrated with this!!
  7906.  
  7907. \marc
  7908.  
  7909. --
  7910. Marc N. Cannava                         |  Tigers are nimble,
  7911. Technical Staff, The MITRE Corporation  |  And light on their toes,
  7912. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  7913. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  7914.  
  7915. ------------------------------
  7916.  
  7917. Date:    Wed, 20 Apr 1994 13:06:55 -0500
  7918. From:    Fred Terry <pfterry@LKS.CSI.COM>
  7919. Subject: new versions of Menu Events and Jon's Commands
  7920.  
  7921. Hi everyone,
  7922.  
  7923. I've moved new versions of Menu Events, Menu Grabber, and Jon's commands into
  7924. the appropriate directories. Jon's already let everyone know about the new
  7925. features in his osax. Among other things, Ross Brown has added recordability
  7926. and support for non-standard menu definitions to Menu Events. You can find out
  7927. more about it from the file
  7928.  
  7929. ftp://gaea.kgs.ukans.edu/applescript/addons/About_ME_MG_HoW_Upload.txt
  7930.  
  7931. You will find the updated versions in
  7932.  
  7933. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  7934. ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Grabber_1.1.2.sit.Hqx
  7935. ftp://gaea.kgs.ukans.edu/applescript/osaxen/JonsCommands.sit.hqx
  7936.  
  7937. Enjoy.
  7938.  
  7939. pf
  7940.  
  7941. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7942. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  7943.  
  7944. ------------------------------
  7945.  
  7946. Date:    Wed, 20 Apr 1994 12:03:27 -0700
  7947. From:    "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  7948. Subject: Re: Can't get script to run!! Why?
  7949.  
  7950. At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  7951. >Now. I have a simple script that looks like this:
  7952. >
  7953. >        tell application "Scriptable Text Editor"
  7954. >                activate
  7955. >                set selection to "Welcome to AppleScript"
  7956. >                select word 3 of document 1
  7957. >                set style of selection to italic
  7958. >        end tell
  7959. >
  7960. >I save it as an Application called "My First Script", then I quit the
  7961. >editor. Both editors, in fact.
  7962. >
  7963. >Now. Whenever I double-click on the "My First Script" application, it
  7964. >brings up the title box, and I click on "Run". It then immediately
  7965. >quits, doing nothing.
  7966.  
  7967.  
  7968. Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  7969. etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  7970.  
  7971. I'd suspect something in your installation.  What does this variation do?
  7972.  
  7973. 1.  By hand, start Scriptable Text Editor.  You should have a blank
  7974. untiltled document (choose New from the File menu if that isn't true).
  7975.  
  7976. 2.  Double click on your saved script application.
  7977.  
  7978.  
  7979. If that works, now try quitting Scriptable Text Editor, and once again
  7980. double-clicking the saved script application.
  7981.  
  7982. --John
  7983.  
  7984. --
  7985. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  7986. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  7987.  
  7988. ------------------------------
  7989.  
  7990. Date:    Wed, 20 Apr 1994 13:13:33 -0800
  7991. From:    Mike Cohen <isis@NETCOM.COM>
  7992. Subject: Re: AppleScript speed (or slowness)
  7993.  
  7994. At 10:59 PM 4/19/94 -0700, Jon Pugh wrote:
  7995. (explanation of process manager deleted)
  7996. >
  7997. >There ought to be a way to take a script and run it in the target
  7998. >application's process via an osax which uses an OSASendProc to convert all
  7999. >the AE into SendToSelf addressing.  That would short circuit the process
  8000. >manager.  Hmm, I'll have to look into that.
  8001. >
  8002. This would speed things up dramatically. Several of the enhacements in
  8003. Frontier such system event handlers make a very big difference in the
  8004. speed. Sending more data in each event also helps a lot.
  8005.  
  8006. Right now I'm fighting with Excel trying to speed up data transfers from
  8007. another application. I found that setting a cell at a time (which is the
  8008. easiest way in UserTalk) is painfully slow, but creating an array and
  8009. sending it to a range is a very big improvement. As for my own application
  8010. (which transfers data to/from a Newton), I was able to improve things a lot
  8011. by having a single event do something like "get next n records" rather than
  8012. getting a single record per event.
  8013.  
  8014. _______________________________________________________________
  8015. Mike Cohen
  8016. ISIS International   | "Software that means business"
  8017. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  8018. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  8019.  
  8020. ------------------------------
  8021.  
  8022. Date:    Wed, 20 Apr 1994 16:16:26 -0400
  8023. From:    "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  8024. Subject: Re: Can't get script to run!! Why?
  8025.  
  8026. >
  8027. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  8028. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  8029. >
  8030. > I'd suspect something in your installation.  What does this variation do?
  8031. >
  8032.  
  8033. Stranger and stranger:
  8034.  
  8035.         - If I record my actions and let the Script Editor build
  8036.           the script for me, then immediately save the script as an
  8037.           application, the resulting application doesn't work. By
  8038.           this, I mean that when I double-click on the application,
  8039.           it launches, asks me if I want to run it, then it just
  8040.           quits.
  8041.  
  8042.  
  8043.         - If, however, I record actions and then modify the script
  8044.           somehow (even just type a "space" into the editor box),
  8045.           then save it as an application, it works!!
  8046.  
  8047. I don't get it. I've installed the s/w on three machines now, and they
  8048. all do the same thing. (A Workgroup Server 60, a PowerBook 170, and a
  8049. Mac IIsi.)
  8050.  
  8051. Any ideas??
  8052.  
  8053. \marc
  8054.  
  8055. --
  8056. Marc N. Cannava                         |  Tigers are nimble,
  8057. Technical Staff, The MITRE Corporation  |  And light on their toes,
  8058. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  8059. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  8060.  
  8061. ------------------------------
  8062.  
  8063. Date:    Wed, 20 Apr 1994 16:34:28 -0400
  8064. From:    "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  8065. Subject: Re: Can't get script to run!! Why?
  8066.  
  8067. >
  8068. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  8069. > >Now. I have a simple script that looks like this:
  8070. > >
  8071. > >        tell application "Scriptable Text Editor"
  8072. > >                activate
  8073. > >                set selection to "Welcome to AppleScript"
  8074. > >                select word 3 of document 1
  8075. > >                set style of selection to italic
  8076. > >        end tell
  8077. > >
  8078. > >I save it as an Application called "My First Script", then I quit the
  8079. > >editor. Both editors, in fact.
  8080. > >
  8081. > >Now. Whenever I double-click on the "My First Script" application, it
  8082. > >brings up the title box, and I click on "Run". It then immediately
  8083. > >quits, doing nothing.
  8084. >
  8085.  
  8086. Even stranger::
  8087.  
  8088. If I take the script that I recorded, select it, copy it, paste it
  8089. into new script, then run the new script as an application, it works!
  8090. The original stil doesn't work.
  8091.  
  8092. My thoughts are that for some reason, I can't run a "recorded" script.
  8093. Any ideas why that might be so? Is there any difference between a
  8094. "recorded" script and one that I just typed in directly?
  8095.  
  8096. I'm so confused..
  8097.  
  8098. \marc
  8099.  
  8100. --
  8101. Marc N. Cannava                         |  Tigers are nimble,
  8102. Technical Staff, The MITRE Corporation  |  And light on their toes,
  8103. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  8104. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  8105.  
  8106. ------------------------------
  8107.  
  8108. Date:    Wed, 20 Apr 1994 14:24:54 -0700
  8109. From:    "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  8110. Subject: Re: Can't get script to run!! Why?
  8111.  
  8112. At 16:16 4/20/94 -0400, Marc N. Cannava wrote:
  8113. >        - If I record my actions and let the Script Editor build
  8114. >          the script for me, then immediately save the script as an
  8115. >          application, the resulting application doesn't work. By
  8116. >          this, I mean that when I double-click on the application,
  8117. >          it launches, asks me if I want to run it, then it just
  8118. >          quits.
  8119. >
  8120. >
  8121. >        - If, however, I record actions and then modify the script
  8122. >          somehow (even just type a "space" into the editor box),
  8123. >          then save it as an application, it works!!
  8124.  
  8125.  
  8126. Hmmm...making any change and then saving causes the script to be compiled
  8127. again.  Simply changing it probably doesn't.  Something about the
  8128. compilation fixes something (quite likely the form in which
  8129.  
  8130.     application "Scriptable Text Editor"
  8131.  
  8132. is stored in the compiled script.)
  8133.  
  8134. I don't think it *should* work that way.  [I had in fact changed the
  8135. recorded script slightly...when I follow your recipe correctly, I get the
  8136. same effect you do.]
  8137.  
  8138.    --John
  8139.  
  8140. --
  8141. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  8142. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  8143.  
  8144. ------------------------------
  8145.  
  8146. Date:    Wed, 20 Apr 1994 10:41:02 PDT
  8147. From:    "David Rogers,Eng" <david.rogers@ALDUS.COM>
  8148. Subject: Re: Can't get script to run!! Why?
  8149.  
  8150. Marc,
  8151.  
  8152. The script you sent works fine on my machine and I am using AS 1.1.  Two
  8153. things: 1) Make sure you check the syntax of the script before saving.  2)
  8154. When you save as an application check the "Never Show Startup Screen"
  8155. button.
  8156.  
  8157. Regards,
  8158. David
  8159. ---------------------------------------------------------------------------
  8160. david.rogers@aldus.com    -========)--  Frodo Lives
  8161. --(========-
  8162. ---------------------------------------------------------------------------
  8163. _______________________________________________________________________________
  8164. From: Macintosh Scripting Systems on Wed, Apr 20, 1994 10:09 AM
  8165. Subject: Can't get script to run!! Why?
  8166. To: David Rogers,Eng
  8167.  
  8168. Help! This is driving me nuts!
  8169.  
  8170. I *just* got version 1.1 of the AppleScript Developer's Kit from
  8171. Apple. I can't get the FIRST SCRIPT to run (as listed in the "Getting
  8172. Started" manual)!
  8173.  
  8174. They say to go into the Script Editor, enter "RECORD" mode, and then
  8175. fire up the Scriptable Text Editor, type some text, change the style.
  8176. Then, stop recording.
  8177.  
  8178. Now. I have a simple script that looks like this:
  8179.  
  8180.         tell application "Scriptable Text Editor"
  8181.                 activate
  8182.                 set selection to "Welcome to AppleScript"
  8183.                 select word 3 of document 1
  8184.                 set style of selection to italic
  8185.         end tell
  8186.  
  8187. I save it as an Application called "My First Script", then I quit the
  8188. editor. Both editors, in fact.
  8189.  
  8190. Now. Whenever I double-click on the "My First Script" application, it
  8191. brings up the title box, and I click on "Run". It then immediately
  8192. quits, doing nothing.
  8193.  
  8194. What gives? This is a simple application -- and it doesn't work!!!
  8195. When I re-load it into the editor, and click on "run", it works fine.
  8196.  
  8197. HELP!!! It didn't take long for me to get frustrated with this!!
  8198.  
  8199. \marc
  8200.  
  8201. --
  8202. Marc N. Cannava                         |  Tigers are nimble,
  8203. Technical Staff, The MITRE Corporation  |  And light on their toes,
  8204. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  8205. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  8206.  
  8207. ------------------------------
  8208.  
  8209. Date:    Wed, 20 Apr 1994 20:39:07 -0700
  8210. From:    "Allan R. Crump" <jhhw@CRL.COM>
  8211. Subject: Re: Can't get script to run!! Why?
  8212.  
  8213. Why not try copying the script into Script Editor and running it from
  8214. there ?  You could probably trap it with some dialog messages and see
  8215. what it's doing...
  8216. (just my 2cents worth)
  8217.  
  8218.  
  8219. On Wed, 20 Apr 1994, John W. Baxter wrote:
  8220.  
  8221. > At 13:03 4/20/94 -0400, Marc N. Cannava wrote:
  8222. > >Now. I have a simple script that looks like this:
  8223. > >
  8224. > >        tell application "Scriptable Text Editor"
  8225. > >                activate
  8226. > >                set selection to "Welcome to AppleScript"
  8227. > >                select word 3 of document 1
  8228. > >                set style of selection to italic
  8229. > >        end tell
  8230. > >
  8231. > >I save it as an Application called "My First Script", then I quit the
  8232. > >editor. Both editors, in fact.
  8233. > >
  8234. > >Now. Whenever I double-click on the "My First Script" application, it
  8235. > >brings up the title box, and I click on "Run". It then immediately
  8236. > >quits, doing nothing.
  8237. >
  8238. >
  8239. > Hmmm...what fails for you, there, works for me, here.  [AppleScript 1.1,
  8240. > etc are the same...I'm on an 8100, meaning System 7.1.2, Finder 7.1.4.]
  8241. >
  8242. > I'd suspect something in your installation.  What does this variation do?
  8243. >
  8244. > 1.  By hand, start Scriptable Text Editor.  You should have a blank
  8245. > untiltled document (choose New from the File menu if that isn't true).
  8246. >
  8247. > 2.  Double click on your saved script application.
  8248. >
  8249. >
  8250. > If that works, now try quitting Scriptable Text Editor, and once again
  8251. > double-clicking the saved script application.
  8252. >
  8253. > --John
  8254. >
  8255. > --
  8256. > jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  8257. > finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  8258. >
  8259.  
  8260. ------------------------------
  8261.  
  8262. Date:    Thu, 21 Apr 1994 12:03:10 +0800
  8263. From:    Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  8264. Subject: Re: AppleScript speed (or slowness)
  8265.  
  8266. >        This whole "situation" will improve SIGNIFICANTLY with the next
  8267. >major release of System Software (ie. 7.5) which includes an improved
  8268. >Process Manager that interacts much better with AppleScript and AE's...
  8269.  
  8270. Speaking of speeding things up.  I now have my PPC card for my Q610 and
  8271. Stuffit Expander is Oh So Slow compared to before.  Does it make Native
  8272. versions arrive any faster if I send dollars :-)  And how much is Stuffit
  8273. Deluxe?
  8274.  
  8275. Cheers,
  8276. Craig
  8277.  
  8278. --
  8279. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  8280. The University of Western Australia      or 380 3860 Email for FAX Number
  8281. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  8282. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  8283.  
  8284. ------------------------------
  8285.  
  8286. End of MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  8287. ***************************************************
  8288. =========================================================================
  8289. Date:         Wed, 20 Apr 1994 23:42:43 -0600
  8290. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8291. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8292. From:         Tom Donovan <donovan@COVIS.NWU.EDU>
  8293. Subject:      AppleScript speed & packing Apple events
  8294.  
  8295. In light of recent discussion indicating that modest speed-ups can be had
  8296. by sending fewer individual apple events, I would like to try to use the
  8297. full form of Eudora's 'make' event:
  8298.  
  8299. make ObjectClass message InsertHere end of mailbox "Out" of mail folder ""
  8300. [with data] [with properties]
  8301.  
  8302. rather than a 'make' plus a handful of 'set's, but haven't had any luck
  8303. divining the syntax.
  8304.  
  8305. Has anyone tried this successfully?  If so, I'd love to know how.
  8306.  
  8307. Many thanks!
  8308.  
  8309. --Tom
  8310.  
  8311.  
  8312. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8313. Tom Donovan           "The city is a place where a small boy, as he walks
  8314. System Administrator   through it, may see something that will tell him what
  8315. CoVis Project          he wants to do his whole life."
  8316. Northwestern Univ.
  8317.                                                     --Louis I. Kahn
  8318. E-mail: donovan@covis.nwu.edu
  8319. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8320. =========================================================================
  8321. Date:         Thu, 21 Apr 1994 00:11:55 -0700
  8322. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8323. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8324. From:         Jon Pugh <jonpugh@NETCOM.COM>
  8325. Subject:      Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  8326.  
  8327. >Even stranger::
  8328. >
  8329. >If I take the script that I recorded, select it, copy it, paste it
  8330. >into new script, then run the new script as an application, it works!
  8331. >The original stil doesn't work.
  8332. >
  8333. >My thoughts are that for some reason, I can't run a "recorded" script.
  8334. >Any ideas why that might be so? Is there any difference between a
  8335. >"recorded" script and one that I just typed in directly?
  8336. >
  8337. >I'm so confused..
  8338.  
  8339. This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
  8340. it and Warren fixed it.  Isn't that special?  ;)
  8341.  
  8342. The detail is that OSAStopRecording returns a handler instead of a script
  8343. object.  The bug wasn't noticed because OSAStopRecording doesn't take a
  8344. modeFlags parameter and it needed to be kOSAModeCompileIntoContext instead
  8345. of kOSAModeNull (and was changed so in 1.1).  Since everyone seemed to
  8346. re-record their scripts it got missed.  In fact, the workaround is simply
  8347. to compile your script again.  Imagine that.
  8348.  
  8349. Handlers are collections of subroutines, but don't involve properties or
  8350. any saved state information.  That's what a context consists of in
  8351. AppleScript.  Every script has an implicit "script <name>" and "end script"
  8352. around it.  As you should know, you also have a implicit "on run" handler
  8353. around your miscellaneous script statements which can be strewn throughout
  8354. your code like so:
  8355.  
  8356. beep
  8357. on open (theFiles)
  8358. end open
  8359. display dialog "Foo!"
  8360.  
  8361. Script objects are one of the way cool things about AppleScript.  You can
  8362. do some pretty nifty stuff with them.  See my Walk Folder osax for a decent
  8363. example of one use for them.  Another use was in my OSA Menu script that I
  8364. recently posted.
  8365.  
  8366. Basically, scripts are:
  8367.  
  8368.   script <name>
  8369.  
  8370.     <prop | property> <propName> : <initial compile time value>
  8371.  
  8372.     on <handlerName>[(params)]
  8373.       [statements]
  8374.     end [<handlerName>]
  8375.  
  8376.   end [<name>]
  8377.  
  8378. You can have 0 or more properties and 0 or more handlers.  Thus, script
  8379. objects can retain values in their properties, giving them persistent
  8380. storage.  The important thing is that the specified initial value will be
  8381. used whenever the script is compiled and will always be displayed when
  8382. viewed.  You cannot directly see the current value of a property.  You need
  8383. to write a script (naturally) which does a "load script" on the script
  8384. resource file and then runs a script like "foo's propName" or "propName of
  8385. foo" which evaluates to the current property value.  If you want a script
  8386. to retain its value, then I strongly recommend never putting code into it
  8387. and/or making it read only.
  8388.  
  8389. Well, that's the ramble for today.  Oh, here's a typing-saver tip.  You can
  8390. use app for application in your tell statement.  It will be expanded.
  8391.  
  8392. Jon
  8393. =========================================================================
  8394. Date:         Thu, 21 Apr 1994 00:03:00 EST
  8395. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8396. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8397. From:         Joseph Block <0006316815@MCIMAIL.COM>
  8398. Subject:      Cheap LISTSERV reception, t
  8399.  
  8400.  If you get two of these, it is because my machine crashed while
  8401. sending the first
  8402. This is going to several lists since it is getting to be that time of
  8403. year when students lose access again.
  8404.  
  8405. No flames for being off topic or commercial please; I'm providing
  8406. this information as a recommendation from a satisfied customer and
  8407. gain nothing (in fact I'm paying to send it) if you decide to act
  8408. upon it other than your continued participation in these lists.
  8409.  
  8410. MCIMail allows unlimited free message reception for $35 annually.
  8411. There is no connect time charge for downloading the messages on the
  8412. 9600 baud 800 number.  Outgoing messages are charged per message,
  8413. depending on the number of characters.  Admittedly the outgoing mail
  8414. isn't cheap, but you can use Cserve/AOL/Delphi/Whatever for that.
  8415. MCIMail also has a special student rate that is (I think) $5 per
  8416. month, but includes 100 free outgoing messages (the first 500 chars
  8417. anyway).  I don't happen to have the 800 number with me.  Other than
  8418. a free account, it is hard to beat $3 a month for your email fix.
  8419.  
  8420. You should also contact netcom (info@netcom.com) about their service.
  8421.  Also, check out Intercon's WorldLink.
  8422. =========================================================================
  8423. Date:         Thu, 21 Apr 1994 09:53:57 GMT
  8424. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8425. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8426. From:         Jean-Michel Beuken <beuken@PCPM.UCL.AC.BE>
  8427. Subject:      "keyword" parameter in Frontier Script
  8428.  
  8429. hello,
  8430.  
  8431. How is it possible to use the "keyword" parameter in Frontier Script ?
  8432. Here above, You can see a piece of code to send a AppleEvent to Frontier.
  8433. I create an script in 'system.verbs.traps.igor.test'
  8434. All work perfectly ! Frontier receives the two parameters and the
  8435. application receive well the returned parameter.
  8436. But my question is : is it possible in Frontier to know the "keyword" (here
  8437. 'typl' or 'typs') associated to the value ?
  8438.  
  8439.  
  8440.  
  8441. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8442. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8443. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8444. =3D=3D=3D=3D
  8445. .
  8446. .
  8447. .
  8448. static long serverid =3D 'LAND'    /* Userland Frontier is the server */
  8449. static Boolean NewAppleEvent (OSType verbtoken, AppleEvent *event) {
  8450.  
  8451.        AEAddressDesc adr;
  8452.        OSErr ec;
  8453.  
  8454.        ec =3D AECreateDesc(typeApplSignature, (Ptr)
  8455. &serverid,sizeof(serverid), &adr);
  8456.  
  8457.        ec =3D AECreateAppleEvent ('igor', verbtoken, &adr, kAutoGenerateRetu=
  8458. rnID,
  8459.                  kAnyTransactionID, event);
  8460.        AEDisposeDesc (&adr);
  8461.        return (ec =3D=3D noErr);
  8462. }
  8463.  
  8464. static int
  8465. Xdummy() {
  8466.         AppleEvent event, reply;
  8467.         long idlong =3D 33;
  8468.         short idshort =3D 11;
  8469.         Boolean fl;
  8470.  
  8471.         if (!NewAppleEvent ('test', &event))
  8472.                 return (false);
  8473.         if (!PushLongParam (idlong, 'typl', &event))
  8474.                 return (false);
  8475.         if (!PushShortParam (idshort, 'typs', &event))
  8476.                 return (false);
  8477.         if (!SendAppleEvent (&event, &reply, false))
  8478.                 return (false);
  8479.  
  8480.         fl =3D GetLongParam (&reply, keyDirectObject, &idlong);
  8481.         AEDisposeDesc (&reply);
  8482.  
  8483.         return(0)
  8484. }
  8485. .
  8486. .
  8487. .
  8488. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8489. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8490. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8491. =3D=3D=3D=3D
  8492.  
  8493.  
  8494. system.verbs.traps.igor.test :
  8495. -----------------------------
  8496.  
  8497. on test (idlong,idshort) {
  8498.         Frontier.bringToFront();;
  8499.         msg("receiving : " + idlong + ", " + idshort );
  8500.         =AB il1 =3D getEventAttribute ('typl')              /* doesn't work=
  8501.  ! */
  8502.         Igor.bringToFront();
  8503.         return (99)
  8504. }
  8505.  
  8506.  
  8507.  
  8508. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8509. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8510. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
  8511. =3D=3D=3D=3D
  8512.  
  8513.  
  8514. -------------------------------------------------------------
  8515. Dr Ir Jean-Michel Beuken
  8516. Computer Scientist & Network Manager
  8517. University of Louvain-La-Neuve
  8518. Lab. PCPM/FSA, Bat. BOLTZMANN
  8519. 1,Place Croix du Sud
  8520. 1348 Louvain-La-Neuve
  8521. BELGIUM
  8522. =46ax (3210)473452
  8523. -------------------------------------------------------------
  8524. =========================================================================
  8525. Date:         Thu, 21 Apr 1994 17:16:07 +0930
  8526. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8527. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8528. From:         Paul Baily <paulb@RANDOMSA.COM.AU>
  8529. Subject:      deleting parts of a variable?
  8530.  
  8531. Hi folks,
  8532.  
  8533. At the risk of asking an embarassingly easy question, how do I delete a
  8534. word or a text item from a variable within AppleScript (1.1)?
  8535.  
  8536. In HyperCard, what I'd do is something like:
  8537.  
  8538.    put "I don't eat snails.  I prefer fast food." into theVar
  8539. [...]
  8540.    delete word 7 of theVar
  8541.  
  8542. with the result of "I don't eat snails.  I prefer food."
  8543.  
  8544. ...but within AppleScript (using 'copy...to' instead of 'put...into' of
  8545. course) this produces this error:
  8546.  
  8547. word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  8548. delete message.
  8549.  
  8550. Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  8551. tried other alternatives like using text items, using 'set word 3 of theVar
  8552. to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  8553. driving me batty. Could some kind soul enlighten me so I can put the whole
  8554. experience behind me and get some sleep? :-)
  8555.  
  8556. TIA,
  8557.  
  8558. Paul.
  8559.  
  8560. --
  8561. _________________________________________________________________________
  8562. Paul Baily, Consulting SE       |                   paulb@randomsa.com.au
  8563.                                 |                    AppleLink:  AUST0370
  8564. ))/\ Random Access              |                   CompuServe: 73320,667
  8565.  \\\\Adelaide, South Australia  |Where we're going, we don't *need* roads
  8566. =========================================================================
  8567. Date:         Thu, 21 Apr 1994 11:26:47 +0000
  8568. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8569. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8570. From:         Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
  8571. Subject:      Hiding Apps from Frontier
  8572.  
  8573. Does anybody know how to hide an application from Frntier? I know it can be
  8574. done by getting Frontier to tell Quickeys to do the hiding, but I find this
  8575. technique inelegant, wasteful and risky!
  8576.  
  8577. I expected to find a command like Finder.hide(appID)/Finder.show(appID).
  8578.  
  8579. Thanks  Jeremy Quinn
  8580.  
  8581.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  8582.              Jeremy Quinn             :              Internet:
  8583.             3D/Interactive            :       jermq@media.demon.co.uk
  8584.               Designer &              :               Phone:
  8585.         Green Design Consultant       :           +44 71 737 6831
  8586.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  8587.       Member of O2 Global Network     :     PGP Key on public keyservers
  8588. =========================================================================
  8589. Date:         Thu, 21 Apr 1994 07:34:58 -0400
  8590. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8591. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8592. From:         "Marc N. Cannava" <mnc@SCOTTY.MITRE.ORG>
  8593. Subject:      Re: MACSCRPT Digest - 19 Apr 1994 to 21 Apr 1994
  8594. In-Reply-To:  <199404210713.DAA04857@mbunix.mitre.org> from "Jon Pugh" at Apr
  8595.               21, 94 00:11:55 am
  8596.  
  8597. >
  8598. > >Even stranger::
  8599. > >
  8600. > >If I take the script that I recorded, select it, copy it, paste it
  8601. > >into new script, then run the new script as an application, it works!
  8602. > >The original stil doesn't work.
  8603. > >
  8604. > >My thoughts are that for some reason, I can't run a "recorded" script.
  8605. > >Any ideas why that might be so? Is there any difference between a
  8606. > >"recorded" script and one that I just typed in directly?
  8607. > >
  8608. > >I'm so confused..
  8609. >
  8610. > This is a bug in AppleScript 1.0 that was fixed in 1.1 because I reported
  8611. > it and Warren fixed it.  Isn't that special?  ;)
  8612. >
  8613.  
  8614. But I'm running AppleScript 1.1. I still have the bug. Is there a
  8615. patch to fix this??
  8616.  
  8617. \marc
  8618.  
  8619. --
  8620. Marc N. Cannava                         |  Tigers are nimble,
  8621. Technical Staff, The MITRE Corporation  |  And light on their toes,
  8622. Email: mnc@mitre.org                    |  My RE-spect for tigers,
  8623. Phone: 617-271-2517  Fax: 617-271-2423  |  Continually grows.  --Hobbes
  8624. =========================================================================
  8625. Date:         Thu, 21 Apr 1994 06:38:00 PDT
  8626. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8627. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8628. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  8629. Subject:      Re: Can't get script to run!! Why?
  8630.  
  8631. >Help! This is driving me nuts!
  8632. >They say to go into the Script Editor, enter "RECORD" mode, and then
  8633. >fire up the Scriptable Text Editor, type some text, change the style.
  8634. >Then, stop recording.
  8635. >
  8636. >Now. I have a simple script that looks like this:
  8637. >
  8638. >        tell application "Scriptable Text Editor"
  8639. >                activate
  8640. >                set selection to "Welcome to AppleScript"
  8641. >                select word 3 of document 1
  8642. >                set style of selection to italic
  8643. >        end tell
  8644. >
  8645. >I save it as an Application called "My First Script", then I quit the
  8646. >editor. Both editors, in fact.
  8647. >
  8648. >Now. Whenever I double-click on the "My First Script" application, it
  8649. >brings up the title box, and I click on "Run". It then immediately
  8650. >quits, doing nothing.
  8651.  
  8652. You've run into a bug in AppleScript/Script Editor.  Running recorded scripts
  8653. which are compiled for you during the record process does not always work.
  8654. The work around is to simply re-compile the script using the Script Editor.
  8655.  
  8656. Sad but true.
  8657.  
  8658. -Mark
  8659. =========================================================================
  8660. Date:         Thu, 21 Apr 1994 10:59:09 -0500
  8661. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8662. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8663. From:         K J Fox <kjfox@MKE.AB.COM>
  8664. Subject:      Speech Macro Editor variables
  8665.  
  8666. Hi,
  8667. I'm exploring AppleScripting with a 660AV Mac and am writing speech
  8668. macros to do various things.  One useful thing would be if the ability
  8669. is there to pass variables into the script from the recognized speech.
  8670.  
  8671. As an example, I wrote a script that "tells" hypercard to do a database
  8672. lookup of a project.  The macro is called "lookup project XYZ".  If my
  8673. database contains 2000 projects then I need 2000 speech macros unless I
  8674. can create a generic "lookup" macro where the second word is a parameter
  8675. that it can decipher into text.
  8676.  
  8677. Is anyone aware of this shortcoming and is there a way around this?
  8678. Are there any speech script additions that handle this sort of thing??
  8679.  
  8680. Ken
  8681.  
  8682. ________________________________________________________________________
  8683. Kenneth J. Fox         |     E-mail:  kjfox@mke.ab.com (pref)
  8684. Allen-Bradley Company  |      Phone:  414-382-3287 (V) 414-382-2742 (F)
  8685. Rockwell Int'l         |      Pager:  414-256-9702
  8686. Milwaukee, WI          |  Applelink:  FOX.K
  8687. =========================================================================
  8688. Date:         Thu, 21 Apr 1994 09:41:14 -0700
  8689. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8690. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8691. From:         Doug Baron <userland@NETCOM.COM>
  8692. Subject:      Re: Hiding Apps from Frontier
  8693. In-Reply-To:  <199404211040.DAA24842@mail.netcom.com> from "Jeremy Quinn" at
  8694.               Apr 21, 94 11:26:47 am
  8695.  
  8696. >
  8697. > Does anybody know how to hide an application from Frntier? I know it can be
  8698. > done by getting Frontier to tell Quickeys to do the hiding, but I find this
  8699. > technique inelegant, wasteful and risky!
  8700. >
  8701. > I expected to find a command like Finder.hide(appID)/Finder.show(appID).
  8702. >
  8703. > Thanks  Jeremy Quinn
  8704. >
  8705. There is a UCMD for Frontier called appMenu that gives you control over
  8706. the system's Application menu. With it installed, you can say:
  8707.  
  8708.    appMenu.select ("Hide UserLand Frontier")
  8709.  
  8710. or select any other item in the menu. To hide a specific app, you need to
  8711. bring it to the front first, so that the Hide item will operate on it.
  8712.  
  8713. Doug Baron
  8714. =========================================================================
  8715. Date:         Thu, 21 Apr 1994 09:45:43 -0700
  8716. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8717. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8718. From:         Doug Baron <userland@NETCOM.COM>
  8719. Subject:      Re: "keyword" parameter in Frontier Script
  8720. In-Reply-To:  <199404210757.AAA14024@mail.netcom.com> from "Jean-Michel Beuken"
  8721.               at Apr 21, 94 09:53:57 am
  8722.  
  8723. >
  8724. >
  8725. > How is it possible to use the "keyword" parameter in Frontier Script ?
  8726. > Here above, You can see a piece of code to send a AppleEvent to Frontier.
  8727. > I create an script in 'system.verbs.traps.igor.test'
  8728. > All work perfectly ! Frontier receives the two parameters and the
  8729. > application receive well the returned parameter.
  8730. > But my question is : is it possible in Frontier to know the "keyword" (here
  8731. > 'typl' or 'typs') associated to the value ?
  8732. >
  8733. >
  8734.  
  8735. It's not possible to deterimine the keywords associated with parameters
  8736. to trap scripts. But the trap "script" itself can be a UCMD, in which
  8737. case your C code could extract the parameter keys.
  8738.  
  8739. Doug Baron
  8740. =========================================================================
  8741. Date:         Thu, 21 Apr 1994 11:04:34 PDT
  8742. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8743. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8744. From:         James Glidewell <jbg@SDC.CS.BOEING.COM>
  8745. Subject:      Embedding QK scripts in AppleScript
  8746.  
  8747. I finally decided to get a copy of Quickeys 3.0 to
  8748. allow myself better control of various non-scriptable
  8749. apps that I use. In general, I have been quite happy
  8750. with QK and it does appear to fill a major gap in my
  8751. ability to use AS for some day to day tasks.
  8752.  
  8753. However...
  8754.  
  8755. I have not figured out a way to embed QK scripts inside
  8756. a AS script. The QK scripting docs give an example of how
  8757. to embed an AS script inside a QK script, but not vice-versa.
  8758.  
  8759. What I want to do is use AS as a looping construct and
  8760. invoke the QK script for each item (file, ...). It would be very
  8761. nice to be able to actually include the QK OSA script directly
  8762. in my AS script, rather than calling a named Quickkey. I really
  8763. don't want to define a lot of 1-shot QK scripts, all installed
  8764. separately, as this seems to be an organiztional nightmare.
  8765.  
  8766. Is there a way to mix & match OSA "dialects" in a single
  8767. script using the script editor?
  8768.  
  8769. Sorry if this has been hashed over many times before - I did
  8770. a careful study of the QK docs and my meager macscrpt archives
  8771. and could find nothing...
  8772.  
  8773. Thanks,
  8774. Jim Glidewell
  8775. jbg@sdc.cs.boeing.com
  8776. =========================================================================
  8777. Date:         Thu, 21 Apr 1994 13:53:34 -0500
  8778. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8779. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8780. From:         Fred Terry <pfterry@LKS.CSI.COM>
  8781. Subject:      Re: Embedding QK scripts in AppleScript
  8782. In-Reply-To:  Your message of "Thu, 21 Apr 94 11:04:34 PDT"
  8783.  
  8784. >I finally decided to get a copy of Quickeys 3.0 to
  8785. >allow myself better control of various non-scriptable
  8786. >apps that I use. In general, I have been quite happy
  8787. >with QK and it does appear to fill a major gap in my
  8788. >ability to use AS for some day to day tasks.
  8789. >
  8790. >However...
  8791. >
  8792. >I have not figured out a way to embed QK scripts inside
  8793. >a AS script. The QK scripting docs give an example of how
  8794. >to embed an AS script inside a QK script, but not vice-versa.
  8795. >
  8796. >What I want to do is use AS as a looping construct and
  8797. >invoke the QK script for each item (file, ...). It would be very
  8798. >nice to be able to actually include the QK OSA script directly
  8799. >in my AS script, rather than calling a named Quickkey. I really
  8800. >don't want to define a lot of 1-shot QK scripts, all installed
  8801. >separately, as this seems to be an organiztional nightmare.
  8802. >
  8803. >Is there a way to mix & match OSA "dialects" in a single
  8804. >script using the script editor?
  8805. >
  8806.  
  8807. You will need to use the run script command. The syntax is something like
  8808.  
  8809.  run script <file ref | script string>
  8810.         [with parameters <list>] [in <component name>]
  8811.  
  8812. After you have QuicKeys installed, open the Script Editor and select QuicKeys
  8813. from the OSA pop-up menu. Then perform the actions that you want to embed.
  8814. That'll get you the QuicKeys script.
  8815.  
  8816. To embed it in an AppleScript, you will need to do something like
  8817.  
  8818. run script "
  8819.  
  8820. [the quickeys script]
  8821.  
  8822. " in "QuicKeys"
  8823.  
  8824. You will also need to place a \ before all of the quotes in the QuicKeys
  8825. script. For instance,
  8826.  
  8827. Wait Application \"Adobe Photoshop 2.0.1\"
  8828.  
  8829. Otherwise, AppleScript gets very confused (<- a technical description of what
  8830. occurs). When you are recording your QuicKeys script, perform your actions
  8831. slowly and use keyboard commands whenever you can.
  8832.  
  8833. Sorry I can't be more specific, but I don't have a Mac handy at the moment.
  8834. This is in the next rev of the faq--which I'm hoping to upload tonight.
  8835.  
  8836. pf
  8837.  
  8838.  
  8839. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8840. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  8841. =========================================================================
  8842. Date:         Thu, 21 Apr 1994 14:13:16 -0500
  8843. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8844. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8845. From:         Fred Terry <pfterry@LKS.CSI.COM>
  8846. Subject:      QuarkXPress scripts
  8847.  
  8848. I have uploaded a set of scripts for QuarkXPress to gaea. You'll find them in
  8849.  
  8850. ftp://gaea.kgs.ukans.edu/applescript/scripts/QuarkScripts.sit.hqx
  8851.  
  8852. These scripts were written by James Teters <JTeters@aol.com> and require
  8853. XPress, QuicKeys, and AppleScript. They have been saved as run only. There are
  8854. scripts that
  8855.  
  8856.      -Find/Replace the color and shade of Text, Backgrounds, lines, and frames
  8857. individually.
  8858.      -Create, delete, and copy guides.
  8859.      -Change the background color, background shade, frame shade, frame width,
  8860. frame shade, line width, rotation, and other items with a single keystroke.
  8861.      -Change the column count, runaround, vertical justification, and text
  8862. inset (with different values for the top, left, bottom and right insets) of a
  8863. text bo
  8864. x from a single dialog box.
  8865.  
  8866. There are 24 scripts in all and a scripting addition is included.
  8867.  
  8868. Enjoy.
  8869.  
  8870. pf
  8871.  
  8872. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  8873. Fred Terry  Cadence Design Systems  pfterry@lks.csi.com  +1 913 841 1283
  8874. =========================================================================
  8875. Date:         Thu, 21 Apr 1994 14:33:05 U
  8876. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8877. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8878. From:         mark stewart <mark_stewart@BIAD23.UTHSCSA.EDU>
  8879. Subject:      comparing dates
  8880.  
  8881.                       comparing dates
  8882. Folks,
  8883. I'm developing a generic suite of scripts that work in conjunction with StepUp
  8884. Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
  8885. 3.01.
  8886. The core script polls the contents of a user's mailbox and creates a table of
  8887. records, one record for each mail message. I would like to then be able to
  8888. filter messages on the basis of when they were received. Thus I am trying to
  8889. figure out how to compare dates to see which is more recent. Does anybody have
  8890. any good algorithms for doing this or know of a verb that I wasn't aware of
  8891. that handles it?
  8892.  
  8893. Mark Stewart
  8894. BIAD-Research Imaging Center
  8895. UTHSCSA
  8896.  
  8897. P.S. AppleScript solutions are equally welcome!
  8898. =========================================================================
  8899. Date:         Thu, 21 Apr 1994 12:01:38 PDT
  8900. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8901. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8902. From:         network_manager@ALDUS.COM
  8903. Organization: Aldus Corporation, Seattle, WA
  8904. Subject:      NDN:Re: Embedding QK scripts in AppleScript
  8905.  
  8906. Your mail to the Microsoft Mail Server could not be fully
  8907. delivered!   No Valid Addresses!   It has been deleted.
  8908.  
  8909. Error List:
  8910.   Bad 'To:' Address: david.rogers@MSM-Inter
  8911. =========================================================================
  8912. Date:         Thu, 21 Apr 1994 15:50:09 -0700
  8913. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8914. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8915. From:         Doug Baron <userland@NETCOM.COM>
  8916. Subject:      Re: comparing dates
  8917. In-Reply-To:  <199404211932.MAA08278@netcom10.netcom.com> from "mark stewart"
  8918.               at Apr 21, 94 02:33:05 pm
  8919.  
  8920. >
  8921. >                       comparing dates
  8922. > Folks,
  8923. > I'm developing a generic suite of scripts that work in conjunction with 
  8924. StepUp
  8925. > Software's QuickAgent to script C.E. Software's QuickMail. I'm using Frontier
  8926. > 3.01.
  8927. > The core script polls the contents of a user's mailbox and creates a table of
  8928. > records, one record for each mail message. I would like to then be able to
  8929. > filter messages on the basis of when they were received. Thus I am trying to
  8930. > figure out how to compare dates to see which is more recent. Does anybody 
  8931. have
  8932. > any good algorithms for doing this or know of a verb that I wasn't aware of
  8933. > that handles it?
  8934. >
  8935. >
  8936. Assuming that the dates are currently stored as strings and use
  8937. reasonable standard notation, all you need to do is coerce them to dates
  8938. and compare the date values. If d1 and d2 are both date strings, you can
  8939. compare them like this:
  8940.  
  8941.        if date (d2) > date (d1)
  8942.             msg (d2 + " is newer than " + d1)
  8943.  
  8944. No algorithms required!
  8945.  
  8946. Doug
  8947. =========================================================================
  8948. Date:         Fri, 22 Apr 1994 08:32:29 -0500
  8949. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8950. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  8951. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  8952. Subject:      renaming files with finder scripting
  8953.  
  8954. Hello,
  8955.  
  8956.  I am using AppleScript 1.1 and the Finder Scripting Extension with System
  8957. 7 pro to do some stuff. I want to duplicate a file and give it a name that
  8958. I want, not just the usually "Old Name copy". I thought the code below
  8959. would work but it doesn't work. The "set name  of " does nothing. I still
  8960. have a duplicate file with the name "Old Name copy."
  8961.  
  8962. ======
  8963.  
  8964. -- Does not work
  8965.  
  8966. tell application "Finder"
  8967.         activate
  8968.         set newFile to duplicate file "Old File" of folder "Some Folder" of
  8969. disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  8970.         set name of newFile to "junk"
  8971. end tell
  8972.  
  8973. =====
  8974.  
  8975.  
  8976. Here is the work-around that I came up with. This works. But why should I
  8977. have to do this ? Is there a more direct way to do what I want to do ?
  8978.  
  8979. Thanks !
  8980.  
  8981. =====
  8982.  
  8983. -- The work around
  8984.  
  8985. tell application "Finder"
  8986.         activate
  8987.         set newFile to duplicate file "Old File" of folder "Some Folder" of
  8988. disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  8989.         set selection to newFile
  8990.         set name of selection to "junk"
  8991. end tell
  8992.  
  8993. ======
  8994.  
  8995.  
  8996. --
  8997. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  8998. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  8999. sshws@convx1.lerc.nasa.gov
  9000. AppleLink: SCHILLING.H
  9001. =========================================================================
  9002. Date:         Fri, 22 Apr 1994 10:09:28 -0400
  9003. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9004. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9005. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  9006. Subject:      Re: renaming files with finder scripting
  9007. In-Reply-To:  <no.id> from "Herb Schilling" at Apr 22, 94 08:32:29 am
  9008.  
  9009. --Herb Schilling wrote:
  9010. >
  9011. > I am using AppleScript 1.1 and the Finder Scripting Extension with System
  9012. >7 pro to do some stuff. I want to duplicate a file and give it a name that
  9013. >I want, not just the usually "Old Name copy". I thought the code below
  9014. >would work but it doesn't work. The "set name  of " does nothing. I still
  9015. >have a duplicate file with the name "Old Name copy."
  9016. >
  9017. >tell application "Finder"
  9018. >        activate
  9019. >        set newFile to duplicate file "Old File" of folder "Some Folder" of
  9020. >disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  9021. >        set name of newFile to "junk"
  9022. >end tell
  9023.  
  9024.     Make this one simple change, and your life will become much easier:
  9025. add "replacing conflicts" to the end of your duplicate command. Without
  9026. this added on the end the duplicate command will leave you with the name
  9027. of the file selected in the Finder, instead of the actual file selected.
  9028. I know this sounds a bit confusing, but that's how the Finder works when
  9029. it duplicates a file. The work around that you come up with forced the
  9030. Finder to select the file, which allows you to then operate on it from
  9031. AppleScript.
  9032.  
  9033. -Hades
  9034. =========================================================================
  9035. Date:         Fri, 22 Apr 1994 07:52:39 U
  9036. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9037. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9038. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  9039. Subject:      Coercing into a reference.
  9040.  
  9041. Coercing into a reference.
  9042. I've got an interesting problem:
  9043. I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  9044. to count the instances of each different answer in a field called 'product'.
  9045. It's not *that* difficult, since there's only 14 different products (and it's
  9046. not easy enough to be done through an FMPro script).
  9047. The way I have it done now is by defining 14 variables, with names that are,
  9048. conveniently, the contents of the product field.  In other words, I have a
  9049. variable called "ADM" to store the number of records with "ADM" in the
  9050. product field, etc.
  9051.  
  9052. So I process each record in the file, and do a comparison.  It looks
  9053. something like this:
  9054. if cell product is "ADM" then
  9055.      set ADM to ADM + 1
  9056. else if cell product is "ADW" then
  9057.      set ADW to ADW + 1
  9058. .....
  9059. else
  9060.      set STW to STW + 1
  9061. end if
  9062.  
  9063. This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  9064. records/second.  I'd like to make it faster, and I'd love to just tell AS
  9065. "use whatever is in the product cell as a *variable name* to play with."
  9066. Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  9067. Applescript), you can't coerce into a variable.  Ideally, it would be
  9068. something like
  9069. set (cell product as variable) to (cell product as variable) + 1
  9070. but I don't think I can do that.
  9071.  
  9072. Suggestions? Comments? Sneering remarks about newbies? :)
  9073.  
  9074. -roy
  9075. =========================================================================
  9076. Date:         Fri, 22 Apr 1994 11:21:53 -0400
  9077. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9078. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9079. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  9080. Subject:      Re: Coercing into a reference.
  9081. In-Reply-To:  <no.id> from "Roy Rapoport" at Apr 22, 94 07:52:39 am
  9082.  
  9083. --Roy Rapoport wrote:
  9084. >
  9085. >So I process each record in the file, and do a comparison.  It looks
  9086. >something like this:
  9087. >if cell product is "ADM" then
  9088. >     set ADM to ADM + 1
  9089. >else if cell product is "ADW" then
  9090. >     set ADW to ADW + 1
  9091. >.....
  9092. >else
  9093. >     set STW to STW + 1
  9094. >end if
  9095. >
  9096. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  9097. >records/second.  I'd like to make it faster, and I'd love to just tell AS
  9098. >"use whatever is in the product cell as a *variable name* to play with."
  9099. >Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  9100. >Applescript), you can't coerce into a variable.  Ideally, it would be
  9101. >something like
  9102. >set (cell product as variable) to (cell product as variable) + 1
  9103. >but I don't think I can do that.
  9104.  
  9105.     You've just hit one of the really large walls in AppleScript. This
  9106. kind of processing can only be done with multiple if statements. What
  9107. you can do to speed this up is get the contents of the field into a a
  9108. variable and then process the if statements on the variable. Calling the
  9109. get data function for each if statement is what is really slowing you
  9110. down.
  9111.     Of course, this would all be a lot easier if AppleScript had a good
  9112. "case of" conditional like Frontier does.
  9113.  
  9114. -Hades
  9115. =========================================================================
  9116. Date:         Fri, 22 Apr 1994 11:56:24 -0400
  9117. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9118. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9119. From:         "Lee K. Hoong" <lhoong@EMORYU1.CC.EMORY.EDU>
  9120. Subject:      Re: Coercing into a reference.
  9121.  
  9122. >Coercing into a reference.
  9123. >I've got an interesting problem:
  9124. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  9125. >to count the instances of each different answer in a field called 'product'.
  9126. >It's not *that* difficult, since there's only 14 different products (and it's
  9127. >not easy enough to be done through an FMPro script).
  9128. >The way I have it done now is by defining 14 variables, with names that are,
  9129. >conveniently, the contents of the product field.  In other words, I have a
  9130. >variable called "ADM" to store the number of records with "ADM" in the
  9131. >product field, etc.
  9132. >
  9133. >So I process each record in the file, and do a comparison.  It looks
  9134. >something like this:
  9135. >if cell product is "ADM" then
  9136. >     set ADM to ADM + 1
  9137. >else if cell product is "ADW" then
  9138. >     set ADW to ADW + 1
  9139. >.....
  9140. >else
  9141. >     set STW to STW + 1
  9142. >end if
  9143. >
  9144. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  9145. >records/second.  I'd like to make it faster, and I'd love to just tell AS
  9146. >"use whatever is in the product cell as a *variable name* to play with."
  9147. >Unfortunately, unless I'm misreading the stupid docs I have (The Tao of
  9148. >Applescript), you can't coerce into a variable.  Ideally, it would be
  9149. >something like
  9150. >set (cell product as variable) to (cell product as variable) + 1
  9151. >but I don't think I can do that.
  9152. >
  9153. >Suggestions? Comments? Sneering remarks about newbies? :)
  9154.  
  9155. It seems to me that you are taking a somewhat more complicated approach
  9156. than necessary.  Can't you get FileMaker Pro to provide the same
  9157. information for you using its summary fields?  This will be a more
  9158. straight-forward (and FASTER) approach than trying to get AppleScript to do
  9159. it.
  9160.  
  9161. Lee.
  9162.  
  9163. Lee K. Hoong
  9164. Dept. of Chemistry, Emory University
  9165. Internet: lhoong@unix.cc.emory.edu  |  America On-line: LHOONG
  9166. Disclaimer: I speak for myself only, not for Emory University
  9167. =========================================================================
  9168. Date:         Fri, 22 Apr 1994 10:37:23 -0700
  9169. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9170. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9171. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  9172. Subject:      Re: Coercing into a reference.
  9173.  
  9174. At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  9175. >I've got an interesting problem:
  9176. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  9177. >to count the instances of each different answer in a field called 'product'.
  9178. >It's not *that* difficult, since there's only 14 different products (and it's
  9179. >not easy enough to be done through an FMPro script).
  9180.  
  9181. The suggestion to copy the cell into a variable before the cascaded if will
  9182. certainly help.  If the database is not too big, you can proceed like this,
  9183. which should be faster still:
  9184.  
  9185.    copy  (field "foo" of database "bar") to theField  -- maybe a specific 
  9186. layout
  9187.  
  9188.    repeat with x in theField
  9189.  
  9190.        if x = "ADM" -- etc the if cascade as before
  9191.  
  9192. If the database is too big, the list that comes back from the get will
  9193. cause memory problems.
  9194.  
  9195. Now let's tackle the if cascade.
  9196.  
  9197. Suppose you define an AppleScript record:
  9198.  
  9199. set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  9200.                                       --AppleScript words or FileMaker words
  9201.  
  9202. something like
  9203.  
  9204. repeat with x in theField -- as before, theField is extracted as a list
  9205.                           -- from FileMaker
  9206.    set item x of totals to item x of totals + 1
  9207.  
  9208. A try statement around that would be a good idea, to handle unknown field
  9209. contents.  In fact, you could start out with an empty record, and let the
  9210. on error part of the try construct add items as new field contents are
  9211. encountered.
  9212.  
  9213. I haven't proven that the record idea will work, but it should.  The get
  9214. field "foo" and the repeat with x in theField ideas have been demonstrated.
  9215.  
  9216.    --John
  9217.  
  9218. --
  9219. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  9220. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  9221. =========================================================================
  9222. Date:         Fri, 22 Apr 1994 12:52:23 -0500
  9223. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9224. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9225. From:         Fred Terry <pfterry@LKS.CSI.COM>
  9226. Subject:      Speech Manager
  9227.  
  9228. How can I let my Mac talk to me in AppleScripts?
  9229. Isn't there a command <<say "Hello, world">> or
  9230. something, or an OSAX to work with Speech Manager?
  9231.  
  9232. Jan.
  9233.  
  9234.  
  9235.  
  9236.  
  9237. Jan Dockx       (Jan.Dockx@cs.kuleuven.ac.be)
  9238. K.U.Leuven; Department of Computer Science
  9239. Celestijnenlaan 200A / L00.10
  9240. 3001 Heverlee
  9241. Belgium
  9242. tel.: ++ 32/16/20 10 15     x3596
  9243. ----------------------------------------------
  9244. The EROOS Research Group can be contacted
  9245. through e-mail at:
  9246. eroos_contact@cs.kuleuven.ac.be
  9247. or through regular mail at:
  9248. Research Group Software Development Methods
  9249. K.U.Leuven; Department of Computer Science
  9250. Celestijnenlaan 200A
  9251. 3001 Heverlee
  9252. Belgium
  9253.  
  9254. ==============================================
  9255.  
  9256. Wisdom is not beauty ...
  9257. =========================================================================
  9258. Date:         Fri, 22 Apr 1994 14:37:45 -0400
  9259. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9260. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9261. From:         John Schettino <js12@GTE.COM>
  9262. Subject:      Re: Coercing into a reference.
  9263.  
  9264. >At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  9265. >Now let's tackle the if cascade.
  9266. >
  9267. >Suppose you define an AppleScript record:
  9268. >
  9269. >set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  9270. >                                      --AppleScript words or FileMaker words
  9271. >
  9272. >something like
  9273. >
  9274. >repeat with x in theField -- as before, theField is extracted as a list
  9275. >                          -- from FileMaker
  9276. >   set item x of totals to item x of totals + 1
  9277. >
  9278. >A try statement around that would be a good idea, to handle unknown field
  9279. >contents.  In fact, you could start out with an empty record, and let the
  9280. >on error part of the try construct add items as new field contents are
  9281. >encountered.
  9282. >
  9283. >I haven't proven that the record idea will work, but it should.  The get
  9284. >field "foo" and the repeat with x in theField ideas have been demonstrated.
  9285.  
  9286. Bzzt! Thank you for playing!
  9287.  
  9288. "Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
  9289. \"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
  9290.  
  9291. This was the test code:
  9292. set totals to {ADM:0, STW:0}
  9293. set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  9294.  
  9295. try
  9296.         repeat with x in theField -- as before, theField is extracted as a list
  9297.                 set item x of totals to (item x of totals) + 1
  9298.                 set totals's x to foo + 1
  9299.         end repeat
  9300. on error str
  9301.         str
  9302. end try
  9303.  
  9304. What we really need is a "contains" command that does a lookup of a string
  9305. in a list to return the OFFSET or ITEM number of the string in the list.
  9306. Does such a beast exist? if so then you could well code something like
  9307. this:
  9308.  
  9309.  
  9310. -- note: I'd like an osax for this function... any C programmers interested?
  9311.  
  9312. on listOffset(str, lst)
  9313.         repeat with x from 1 to number of items in lst
  9314.                 if (str contains (item x of lst)) then
  9315.                         return x
  9316.                 end if
  9317.         end repeat
  9318.         return 0
  9319. end listOffset
  9320.  
  9321. -- here's some test code
  9322.  
  9323. set totals to {0, 0} -- how ever many are needed
  9324. set theFieldNames to {"ADM", "STW"} -- the actual values
  9325.  
  9326. -- our test data
  9327. set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  9328.  
  9329. repeat with x in theField -- as before, theField is extracted as a list
  9330.         set totalItem to listOffset(x, theFieldNames)
  9331.         if (totalItem = 0) then error -- here we have a new field, we could
  9332. just extend our lists
  9333.         set item totalItem of totals to (item totalItem of totals) + 1
  9334. end repeat
  9335.  
  9336. -- this just tests the results
  9337. totals -- prints {3,5} in result window as expected
  9338.  
  9339.  
  9340. - john
  9341.  
  9342. -----------------------------------------
  9343. js12@gte.com             GTE Laboratories
  9344. John Schettino                Waltham, MA
  9345. =========================================================================
  9346. Date:         Fri, 22 Apr 1994 12:01:03 -0700
  9347. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9348. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9349. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  9350. Subject:      Re: Coercing into a reference.
  9351.  
  9352. At 07:52 4/22/94 +0000, Roy Rapoport wrote:
  9353. >Coercing into a reference.
  9354. >I've got an interesting problem:
  9355. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  9356. >to count the instances of each different answer in a field called 'product'.
  9357. >It's not *that* difficult, since there's only 14 different products (and it's
  9358. >not easy enough to be done through an FMPro script).
  9359. >The way I have it done now is by defining 14 variables, with names that are,
  9360. >conveniently, the contents of the product field.  In other words, I have a
  9361. >variable called "ADM" to store the number of records with "ADM" in the
  9362. >product field, etc.
  9363.  
  9364.  
  9365. In a prior response, I suggested that a record could be used to hold the
  9366. totals, rather than individual variables.  I have not been able to convince
  9367. AppleScript to do what I want it to do.  I guess that's what I get for
  9368. assuming that because something is easy in Frontier that it is likely to be
  9369. possible in AppleScript.  I may yet have missed the magic which allows a
  9370. record to be used here.  It's probably best to stick to the cascade of ifs,
  9371. which you already have working.
  9372.  
  9373.  
  9374. [Actually, in Frontier, I would use a table rather than a record, although
  9375. either would work.]
  9376.  
  9377.   --John
  9378.  
  9379. --
  9380. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  9381. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  9382. =========================================================================
  9383. Date:         Fri, 22 Apr 1994 14:28:17 -0700
  9384. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9385. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9386. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  9387. Subject:      Re: Coercing into a reference.
  9388.  
  9389. >>I said this:
  9390. >>Now let's tackle the if cascade.
  9391. >>
  9392. >>Suppose you define an AppleScript record:
  9393. >>
  9394. >>set totals to {ADM: 0, STW: 0, .....} --problems if the names collide with
  9395. >>                                      --AppleScript words or FileMaker words
  9396. >>
  9397. >>something like
  9398. >>
  9399. >>repeat with x in theField -- as before, theField is extracted as a list
  9400. >>                          -- from FileMaker
  9401. >>   set item x of totals to item x of totals + 1
  9402. >>
  9403. >>A try statement around that would be a good idea, to handle unknown field
  9404. >>contents.  In fact, you could start out with an empty record, and let the
  9405. >>on error part of the try construct add items as new field contents are
  9406. >>encountered.
  9407. >>
  9408. >>I haven't proven that the record idea will work, but it should.  The get
  9409. >>field "foo" and the repeat with x in theField ideas have been demonstrated.
  9410.  
  9411. And John Schettino correctly said
  9412. >Bzzt! Thank you for playing!
  9413. >
  9414. >"Can't get item (item 1 of {\"ADM\", \"STW\", \"ADM\", \"STW\", \"ADM\",
  9415. >\"STW\", \"STW\", \"STW\"}) of {ADM:0, STW:0}."
  9416. >
  9417. >This was the test code:
  9418. >set totals to {ADM:0, STW:0}
  9419. >set theField to {"ADM", "STW", "ADM", "STW", "ADM", "STW", "STW", "STW"}
  9420. >
  9421. >try
  9422. >        repeat with x in theField -- as before, theField is extracted as a 
  9423. list
  9424. >                set item x of totals to (item x of totals) + 1
  9425. >                set totals's x to foo + 1
  9426. >        end repeat
  9427. >on error str
  9428. >        str
  9429. >end try
  9430.  
  9431.  
  9432. However, we can build something based on this pattern:
  9433.  
  9434. (* counts is a list of records.  Each record is of the form
  9435.      xname:  some string
  9436.      xcount:  an integer
  9437.      *)
  9438.  
  9439. set counts to {}
  9440.  
  9441. set test to {"foo", "bar", "foo", "baz", "foo"}
  9442.  
  9443. repeat with x in test
  9444.     increment(x as string)
  9445. end repeat
  9446.  
  9447. on increment(aName) -- increment the count for record named name in counts
  9448.     global counts
  9449.     repeat with x in counts -- could/should use a binary search here
  9450.         if xname of x = aName then
  9451.             set xcount of x to (xcount of x) + 1
  9452.             return xcount of x
  9453.         end if
  9454.     end repeat
  9455.     set counts to counts & {{xname:aName, xcount:1}}
  9456.     return 1
  9457. end increment
  9458.  
  9459.  
  9460. counts
  9461.  
  9462.  
  9463. The above test puts the following into the result window of the AppleScript
  9464. Script Editor:
  9465.  
  9466. {{xname:"foo", xcount:3}, {xname:"bar", xcount:1}, {xname:"baz", xcount:1}}
  9467.  
  9468. Testing would have to establish at what point a binary search might become
  9469. desirable in the counts list, remembering that building the list then
  9470. becomes slower.  I suspect that a linear search is better until the list
  9471. becomes quite large.
  9472.  
  9473.     --John
  9474.  
  9475. --
  9476. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  9477. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  9478. =========================================================================
  9479. Date:         Fri, 22 Apr 1994 16:57:01 -0500
  9480. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9481. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9482. From:         Igor Livshits <igorl@UIUC.EDU>
  9483. Subject:      Clipboard juggling
  9484.  
  9485. Howdy,
  9486.  
  9487. I am trying to use MenuEvents and Jon's Commands in tandem to copy selected
  9488. text within an active window to the clipboard. Then, I place the contents
  9489. of the clipboard into a string variable and pass it as an argument to a
  9490. command directed to another application.
  9491.  
  9492. The text definitely gets copied, but the application does not put the
  9493. contents into the system scrap, rather it keep is locally. I thought that
  9494. actiavting/deactivating between two apps would force the first application
  9495. to set system scrap to its local scrap as it surrenders its foreground
  9496. status, but is not the case.
  9497.  
  9498. Here's what happens:
  9499.  
  9500. 1. The script runs, and the copy is performed via MenuEvents in app1
  9501.  
  9502. 2. App2 is activated, but the clipboard contains old system scrap data
  9503.  
  9504. 3. If I manually bring app1 to the foreground and then manually bring app2
  9505. to the foreground (no other actions in between), the system scrap will
  9506. contain new data.
  9507.  
  9508. Because of this, I cannot use Jon's Commands' the clipboard OSAX as it
  9509. seems to work with system scrap only. Forcing several iterations of
  9510. activate app1, activate app2 does not help at all.
  9511.  
  9512. So, is there a way to force an application to update system scrap?
  9513.  
  9514. Below are two AS handlers that do the work:
  9515.  
  9516. --
  9517.  
  9518. on CopiedSelection()
  9519.   global menuID, itemID, hostApplication, selectedURL
  9520.  
  9521.   try
  9522.     tell application hostApplication
  9523.       activate
  9524.       Select Menu Item menu id menuID menu item id itemID -- copy the URL
  9525. to the clipboard
  9526.       set selectedURL to (the clipboard as string) -- make local copy of
  9527. the selection
  9528.       return true
  9529.     end tell
  9530.   on error
  9531.     return false
  9532.   end try
  9533. end CopiedSelection
  9534.  
  9535. --
  9536.  
  9537. on FetchSelection()
  9538.   global selectedURL
  9539.  
  9540.   try
  9541.     tell application "Anarchie"
  9542.       activate
  9543.       --fetch url selectedURL
  9544.     end tell
  9545.   on error errorString number errorNumber
  9546.     -- better error handling under construction
  9547.     error errorString number errorNumber
  9548.   end try
  9549. end FetchSelection
  9550.  
  9551. --
  9552.  
  9553. I'll send the full script to anyone interested.
  9554.  
  9555. Thanks for your help, Igor
  9556.  
  9557. _____
  9558. NCSA-UIUC, e: igorl@uiuc.edu, w: (217) 244-0424;  Have a Coke and a smile :)
  9559. =========================================================================
  9560. Date:         Fri, 22 Apr 1994 16:33:24 U
  9561. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9562. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9563. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  9564. Subject:      Converting to Uppercase
  9565.  
  9566. Converting to Uppercase
  9567. Is there any function in applescript that converts letters/words to capital
  9568. letters? something like,
  9569. copy capitalize string to string2
  9570. so if string is "string", string2 would be "STRING"...
  9571.  
  9572. -roy
  9573. =========================================================================
  9574. Date:         Fri, 22 Apr 1994 20:06:20 U
  9575. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9576. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9577. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  9578. Subject:      2 simple (?) questions
  9579.  
  9580. 2 simple (?) questions
  9581. Firstly, I need to tell AS to show all records in an FMPro Dbase whose field
  9582. product is equal to something.  I was using something like this:
  9583. show (every record whose field product is "ADM")
  9584.  
  9585. The problem is that this catches both field product "ADM" and field product
  9586. "ADMB".  Is there any way to tell it I want an exact match? I tried using
  9587. 'exactly' :)
  9588.  
  9589. I think I've just forgotten the second question.  Nevermind ... :)
  9590.  
  9591. -roy
  9592. =========================================================================
  9593. Date:         Sat, 23 Apr 1994 14:23:00 PDT
  9594. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9595. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9596. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  9597. Subject:      Re: Speech Manager
  9598.  
  9599. > How can I let my Mac talk to me in AppleScripts?
  9600. > Isn't there a command <<say "Hello, world">> or
  9601. > something, or an OSAX to work with Speech Manager?
  9602.  
  9603. Try the speak command in Script Tools 1.3 or later.
  9604.  
  9605. Cheers
  9606. -Mark
  9607. =========================================================================
  9608. Date:         Thu, 21 Jul 1994 18:17:23 +1100
  9609. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9610. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9611. From:         Michael Norris <michael.norris@STONEBOW.OTAGO.AC.NZ>
  9612. Subject:      Looking for Eudora Scripts
  9613.  
  9614. Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  9615. some intelligent things with my mail - eg if it's from a listServ address
  9616. automatically file it in the appropriate mail-box.
  9617.  
  9618. Any ideas?
  9619.  
  9620. Cheers,
  9621.  
  9622. Michael Norris,
  9623. CAL Consultant,
  9624. University of Otago,
  9625. PO Box 56,
  9626. Dunedin,
  9627. New Zealand.
  9628. ---------------------
  9629. Ph:(03) 479-7705
  9630. E-Mail: michael.norris@stonebow.otago.ac.nz
  9631. =========================================================================
  9632. Date:         Mon, 25 Apr 1994 04:49:21 -0400
  9633. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9634. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9635. From:         Samuel Alcoff <alcoff@ENIAC.SEAS.UPENN.EDU>
  9636. Subject:      Scriptable Finger app or osax
  9637.  
  9638. Hi,
  9639.  
  9640.         Does anyone out there know of a scriptable finger application or
  9641. OSAX?  I'd like to be able to finger someone through a script, preferrably
  9642. through an OSAX, but I'll take whatever I can get.
  9643.  
  9644.         Baring a pre-made solution, does anyone know where I can get source
  9645. code in C to such an application?  Peter Lewis's excellent app "Finger"
  9646. unfortunately does not currently support scripting, and was written in
  9647. Pascal so I can't even hack his code.  (I don't have a Pascal compiler)
  9648.  
  9649.         Thanks,
  9650.           Sam
  9651. =========================================================================
  9652. Date:         Mon, 25 Apr 1994 12:11:51 +0000
  9653. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9654. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9655. From:         Jeremy Quinn <jermq@MEDIA.DEMON.CO.UK>
  9656. Subject:      Menu Events
  9657.  
  9658. I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  9659.  
  9660. I am having some problems using the files in the archive.
  9661.  
  9662. The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  9663. aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  9664.  
  9665. The (AppleScript) sample script will not pass the syntax check.
  9666.  
  9667. I can't really work out how to use any of it.
  9668. Has anyone got any sample scripts for Frontier?
  9669.  
  9670. Thanks Jeremy
  9671.  
  9672.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  9673.              Jeremy Quinn             :              Internet:
  9674.             3D/Interactive            :       jermq@media.demon.co.uk
  9675.               Designer &              :               Phone:
  9676.         Green Design Consultant       :           +44 71 737 6831
  9677.         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  9678.       Member of O2 Global Network     :     PGP Key on public keyservers
  9679. =========================================================================
  9680. Date:         Mon, 25 Apr 1994 09:07:38 -0600
  9681. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9682. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9683. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  9684. Subject:      Re: Looking for Eudora Scripts
  9685.  
  9686. >Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  9687. >some intelligent things with my mail - eg if it's from a listServ address
  9688. >automatically file it in the appropriate mail-box.
  9689.  
  9690.  
  9691. Hello,
  9692.  
  9693. I just started using Eudora because of its scriptability. I love it!
  9694.  
  9695. Here is a quick script for sorting mail. I've edited it a bit for clarity
  9696. (and shortened some variable names so they'd fit in 80 columns!). This is a
  9697. rough script - it has not been refined and isn't necessarily very well
  9698. written, but it does its job very nicely. I use more if routines for sorting
  9699. the mail than you see here.
  9700.  
  9701. "Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
  9702. Besides communicating, I use it to notify me about a lot of things (I have
  9703. a folder-watching AppleScript that notifies me through Messenger). It is
  9704. scriptable (obviously!). It's free and available on Info-Mac's archives,
  9705. UMich and everywhere fine freeware is distributed!
  9706.  
  9707. -DM
  9708.  
  9709.  
  9710.  
  9711.  
  9712. on idle
  9713.         if "Eudora1.4.2" is in ((list applications) as string) then
  9714.                 try
  9715.                         tell application "Eudora1.4.2"
  9716.                                 with timeout of 1200 seconds
  9717.                                         set prevNoOfMsgs to number of message 
  9718. of
  9719.     mailbox "In" of mail folder ""
  9720.                                         connect
  9721.                                         set currNoOfMsgs to number of message 
  9722. of
  9723.     mailbox "In" of mail folder ""
  9724.                                         set theMessages to ""
  9725.                                         if prevNoOfMsgs =82 currNoOfMsgs then
  9726.                                                 set alertMessenger to true
  9727.                                                 set x to prevNoOfMsgs + 1
  9728.                                                 repeat (currNoOfMsgs - 
  9729. prevNoOfM
  9730.    sgs) times
  9731.                                                         set sndr to field 
  9732. "From"
  9733.     of message x of mailbox "In" of mail folder =
  9734. ""
  9735.                                                         set recip to field "To"
  9736.    of message x of mailbox "In" of mail folder "=
  9737. "
  9738.                                                         set sbjct to Subject of
  9739.    message x of mailbox "In" of mail folder ""
  9740.                                                         set theMessages to 
  9741. theMe
  9742.    ssages & sndr & return & sbjct
  9743.                                                         set x to x + 1
  9744.                                                         if sndr contains 
  9745. "mulle"
  9746.     then
  9747.                                                                 set x to x - 1
  9748.                                                                 move message x 
  9749. o
  9750.    f mailbox "In" of mail folder "" InsertHere end of
  9751. mailbox "MullNet" of mail folder ""
  9752.                                                         end if
  9753.                                                         if recip contains 
  9754. "MACSC
  9755.    RPT" then
  9756.                                                                 set x to x - 1
  9757.                                                                 move message x 
  9758. o
  9759.    f mailbox "In" of mail folder "" InsertHere end of
  9760. mailbox "AppleScript" of mail folder ""
  9761.                                                         end if
  9762.                                                 end repeat
  9763.                                         else
  9764.                                                 set alertMessenger to false
  9765.                                         end if
  9766.                                 end timeout
  9767.                         end tell
  9768.                 =09
  9769.                         if alertMessenger is true then
  9770.                                 tell application "Messenger 1.5.9"
  9771.                                         copy "*:**New Mail**" to variable 
  9772. "theSe
  9773.    nder"
  9774.                                         copy return & theMessages & "**END**" 
  9775. to
  9776.     variable "theData"
  9777.                                         copy "Message" to variable 
  9778. "theDataType"
  9779.                                         do script "receiveTheEvent"
  9780.                                 end tell
  9781.                         end if
  9782.                 on error
  9783.                 end try
  9784.         end if
  9785.         return 120 -- Idle time in seconds
  9786. end idle
  9787.  
  9788. Desmond K. Mullen - University of Minnesota, Office of Admissions
  9789. mulle009@maroon.tc.umn.edu - 612/625-0824
  9790. =========================================================================
  9791. Date:         Mon, 25 Apr 1994 10:44:55 -0500
  9792. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9793. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9794. From:         Herb Schilling <hschilling@LERC.NASA.GOV>
  9795. Subject:      Re: renaming files with finder scripting
  9796.  
  9797. >--Herb Schilling wrote:
  9798. >>
  9799. >> I am using AppleScript 1.1 and the Finder Scripting Extension with System
  9800. >>7 pro to do some stuff. I want to duplicate a file and give it a name that
  9801. >>I want, not just the usually "Old Name copy". I thought the code below
  9802. >>would work but it doesn't work. The "set name  of " does nothing. I still
  9803. >>have a duplicate file with the name "Old Name copy."
  9804. >>
  9805. >>tell application "Finder"
  9806. >>        activate
  9807. >>        set newFile to duplicate file "Old File" of folder "Some Folder" of
  9808. >>disk "CodeDevelopment" to folder "Some Folder" of disk "CodeDevelopment"
  9809. >>        set name of newFile to "junk"
  9810. >>end tell
  9811. >
  9812. >    Make this one simple change, and your life will become much easier:
  9813. >add "replacing conflicts" to the end of your duplicate command. Without
  9814. >this added on the end the duplicate command will leave you with the name
  9815. >of the file selected in the Finder, instead of the actual file selected.
  9816. >I know this sounds a bit confusing, but that's how the Finder works when
  9817. >it duplicates a file. The work around that you come up with forced the
  9818. >Finder to select the file, which allows you to then operate on it from
  9819. >AppleScript.
  9820. >
  9821.  
  9822. At first I wrote a simple script that made use of your suggestion and
  9823. everything worked fine. Now that I put this suggestion into my larger
  9824. script, I have the same problem as before! I have to do the selection
  9825. work-around to make it work again. Got me what is going on.
  9826.  
  9827. --
  9828. Herb Schilling NASA Lewis Research Center 21000 Brookpark Road Mail Stop 142-4
  9829. Cleveland Ohio 44135 (216) 433-8955 Fax:(216)433-8000 
  9830. sshws@convx1.lerc.nasa.gov
  9831. AppleLink: SCHILLING.H
  9832. =========================================================================
  9833. Date:         Mon, 25 Apr 1994 13:21:25 -0600
  9834. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9835. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9836. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  9837. Subject:      Re: Scriptable Finger app or osax
  9838.  
  9839. >Hi,
  9840. >
  9841. >        Does anyone out there know of a scriptable finger application or
  9842. >OSAX?  I'd like to be able to finger someone through a script, preferrably
  9843. >through an OSAX, but I'll take whatever I can get.
  9844. >
  9845. >        Baring a pre-made solution, does anyone know where I can get source
  9846. >code in C to such an application?  Peter Lewis's excellent app "Finger"
  9847. >unfortunately does not currently support scripting, and was written in
  9848. >Pascal so I can't even hack his code.  (I don't have a Pascal compiler)
  9849. >
  9850. >        Thanks,
  9851. >          Sam
  9852.  
  9853.  
  9854.  
  9855. Hi, contact Atul Butte. Following is the text of his TCP/IP Scripting
  9856. Addition OSAX beta test distribution.
  9857.  
  9858. -DM
  9859.  
  9860.  
  9861.  
  9862.  
  9863.  
  9864.  
  9865. Subject: TCP/IP Scripting Addition
  9866.  
  9867. My Legal Department finally approved the distribution, so...
  9868.  
  9869. The next message you receive from me will be a 74 kilobyte BinHex encoded
  9870. self-enclosed archive (an application that you can open). Enclose in the
  9871. archive are the TCP/IP Scripting Addition (version 1.0b1), a first draft of
  9872. the instructions, and five sample scripts.  These are:
  9873.  
  9874. 1. Drag and Drop FTP  -- Drag files on it and it will FTP them to a host
  9875. 2. Finger  -- Tell it who and where to look for someone and it will Finger them
  9876. 3. Get Weather  -- What's the weather like in Washington DC? (via Gopher)
  9877. 4. Gopher Server  -- Makes text files available over Gopher
  9878. 5. Send Mail  -- Sends a simple mail message using SMTP
  9879.  
  9880. These sample scripts are described in a READ ME file (also enclosed in the
  9881. archive).
  9882.  
  9883. PLEASE NOTE:  This 1.0b1 version of the Scripting Addition EXPIRES on May
  9884. 1, 1994.  By then, you will have received a better version.  This is to
  9885. prevent people from continuing to use the older versions when newer ones
  9886. are available.
  9887.  
  9888. Please test the scripting addition on as many platforms as possible
  9889. (PowerBook, Power PC, A/UX, System 7.5, InterSLIP and MacSLIP).  Of course,
  9890. I would like to hear about any bugs you find, but I am also interested in
  9891. hearing how you are using these scripts and whether they work for you.  Let
  9892. me know if you would like to see additional commands in this suite.  I also
  9893. would like to get comments about the first-draft instructions.  I plan to
  9894. fix any bugs that you find and ideally release this scripting addition in
  9895. April.
  9896.  
  9897. If you come up with interesting scripts and you with to share them, please
  9898. post them on comp.sys.mac.programmer, comp.sys.mac.comm, or better yet on
  9899. the AppleScript mailing list.  I would love to see scripts combining
  9900. FileMaker and Gopher Server, or NetNews and MacWrite Pro, etc.  It is VERY
  9901. easy to use this scripting addition to facilitate ANY Internet
  9902. client-server interactions.
  9903.  
  9904. Many of you contacted me about using the scripting addition to help with
  9905. tasks in your company, as part of in-house products, as part of free
  9906. products, and as part of commercial products.  I am working on a licensing
  9907. plan that will start after the beta period is over.  If you have not
  9908. already, please let me know if you are interested in licensing the
  9909. scripting addition for one of these purposes.  For those of you who have
  9910. already, I will be sending you more information.
  9911.  
  9912. Thanks again for your interest!
  9913.  
  9914. -- Atul Butte
  9915.  
  9916. P.S. Please send mail to this address, as it will last longer than my NIH
  9917. address...
  9918.  
  9919. ----------------------------------------------------------------------
  9920. Atul Butte
  9921. atul_butte@brown.edu
  9922.  
  9923. currently at
  9924.    Howard Hughes Medical Institute / National Institutes of Health
  9925. atul_butte@nih.gov
  9926.  
  9927. Desmond K. Mullen - University of Minnesota, Office of Admissions
  9928. mulle009@maroon.tc.umn.edu - 612/625-0824
  9929. =========================================================================
  9930. Date:         Mon, 25 Apr 1994 15:36:24 -0400
  9931. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9932. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9933. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  9934. Subject:      Scripting InterSLIP???
  9935.  
  9936. I could have sworn that not too long ago I saw some messages on this list
  9937. regarding scripting InterSLIP.  However, I tried dragging every part of
  9938. InterSLIP (control panel, extension and DA) onto the script editor and none
  9939. have a dictionary.  Am I mistaken?  If not, how do I script it?
  9940.  
  9941. Also, on a related note, is there any way to have a "shutdown script"?
  9942. Something that gets run after a shutdown (actually, after all applications
  9943. excepting the Finder are quit from a shutdown).  I would like to make
  9944. simple script that automatically disconnects the InterSLIP connection after
  9945. a shutdown.
  9946.  
  9947. Are either of the commercial SLIP products (MacSLIP or VersaTerm SLIP)
  9948. scriptable or offer such a feature built in?
  9949.  
  9950. Steve
  9951.  
  9952. ---------------------
  9953.  jonke@gsfc.nasa.gov
  9954. ---------------------
  9955. =========================================================================
  9956. Date:         Mon, 25 Apr 1994 15:51:35 -0500
  9957. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9958. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9959. From:         Drew Phillips <drew@MAIL.COX.SMU.EDU>
  9960. Subject:      ScriptRunner
  9961.  
  9962. Has anyone used this at all.  It seems pretty steep for shareware ($66 I
  9963. think).  I was just curious if the full version was much better than the
  9964. demo version.
  9965.  
  9966. Thanks
  9967.  
  9968. DRew
  9969.  
  9970. ------------------------------------------------------------------------
  9971. Drew Phillips -- ISS           |  I'm going to be -- The Sledgehammer  |
  9972. Cox School of Business         |        This can be my testimony       |
  9973. Meadows School of the Arts     |          I'm your Sledgehammer        |
  9974. Southern Methodist University  |    Let there be no doubt about it     |
  9975. drew@mail.cox.smu.edu          |---------------------------------------|
  9976. =========================================================================
  9977. Date:         Mon, 25 Apr 1994 16:15:03 -0600
  9978. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9979. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  9980. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  9981. Subject:      Re: Looking for Eudora scripts (re-post)
  9982.  
  9983. Eudora can display tabs as spaces, but apparently it sent my sorting script
  9984. with tabs intact, so it doesn't display very nicely in some folks's eemail
  9985. applications.
  9986.  
  9987. Here's the message again with a single space in place of each tab:
  9988.  
  9989. -DM
  9990.  
  9991.  
  9992.  
  9993.  
  9994. >Hi. I'm on the lookout for some AppleScripts that will help Eudora to do
  9995. >some intelligent things with my mail - eg if it's from a listServ address
  9996. >automatically file it in the appropriate mail-box.
  9997.  
  9998.  
  9999. Hello,
  10000.  
  10001. I just started using Eudora because of its scriptability. I love it!
  10002.  
  10003. Here is a quick script for sorting mail. I've edited it a bit for clarity
  10004. (and shortened some variable names so they'd fit in 80 columns!). This is a
  10005. rough script - it has not been refined and isn't necessarily very well
  10006. written, but it does its job very nicely. I use more if routines for sorting
  10007. the mail than you see here.
  10008.  
  10009. "Messenger 1.5.9" is an AppleTalk network communications app that I wrote.
  10010. Besides communicating, I use it to notify me about a lot of things (I have
  10011. a folder-watching AppleScript that notifies me through Messenger). It is
  10012. scriptable (obviously!). It's free and available on Info-Mac's archives,
  10013. UMich and everywhere fine freeware is distributed!
  10014.  
  10015. -DM
  10016.  
  10017.  
  10018.  
  10019.  
  10020. on idle
  10021.  if "Eudora1.4.2" is in ((list applications) as string) then
  10022.   try
  10023.    tell application "Eudora1.4.2"
  10024.     with timeout of 1200 seconds
  10025.      set prevNoOfMsgs to number of message of mailbox "In" of mail folder ""
  10026.      connect
  10027.      set currNoOfMsgs to number of message of mailbox "In" of mail folder ""
  10028.      set theMessages to ""
  10029.      if prevNoOfMsgs =82 currNoOfMsgs then
  10030.       set alertMessenger to true
  10031.       set x to prevNoOfMsgs + 1
  10032.       repeat (currNoOfMsgs - prevNoOfMsgs) times
  10033.        set sndr to field "From" of message x of mailbox "In" of mail folder =
  10034. ""
  10035.        set recip to field "To" of message x of mailbox "In" of mail folder "=
  10036. "
  10037.        set sbjct to Subject of message x of mailbox "In" of mail folder ""
  10038.        set theMessages to theMessages & sndr & return & sbjct
  10039.        set x to x + 1
  10040.        if sndr contains "mulle" then
  10041.         set x to x - 1
  10042.         move message x of mailbox "In" of mail folder "" InsertHere end of
  10043. mailbox "MullNet" of mail folder ""
  10044.        end if
  10045.        if recip contains "MACSCRPT" then
  10046.         set x to x - 1
  10047.         move message x of mailbox "In" of mail folder "" InsertHere end of
  10048. mailbox "AppleScript" of mail folder ""
  10049.        end if
  10050.       end repeat
  10051.      else
  10052.       set alertMessenger to false
  10053.      end if
  10054.     end timeout
  10055.    end tell
  10056.  
  10057.    if alertMessenger is true then
  10058.     tell application "Messenger 1.5.9"
  10059.      copy "*:**New Mail**" to variable "theSender"
  10060.      copy return & theMessages & "**END**" to variable "theData"
  10061.      copy "Message" to variable "theDataType"
  10062.      do script "receiveTheEvent"
  10063.     end tell
  10064.    end if
  10065.   on error
  10066.   end try
  10067.  end if
  10068.  return 120 -- Idle time in seconds
  10069. end idle
  10070.  
  10071. Desmond K. Mullen - University of Minnesota, Office of Admissions
  10072. mulle009@maroon.tc.umn.edu - 612/625-0824
  10073. =========================================================================
  10074. Date:         Mon, 25 Apr 1994 14:18:39 -0700
  10075. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10076. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10077. From:         David Ray <daver@NETCOM.COM>
  10078. Subject:      Re: Scripting InterSLIP???
  10079.  
  10080. >I could have sworn that not too long ago I saw some messages on this list
  10081. >regarding scripting InterSLIP.  However, I tried dragging every part of
  10082. >InterSLIP (control panel, extension and DA) onto the script editor and none
  10083. >have a dictionary.  Am I mistaken?  If not, how do I script it?
  10084.  
  10085. Here is my "InterSLIP Autodialer" script. It requires the scriptable
  10086. app "InterSLIP AE" which is available on ftp.netcom.com/leonardr, as well
  10087. as the "AutoType" osax from gaea.
  10088.  
  10089. -Dave
  10090.  
  10091.  
  10092. global i
  10093. set i to 1
  10094. on idle
  10095.         if i = 1 then
  10096.                 tell application "Finder Liaison 1.1"
  10097.                         --note: you will have to add your own path below
  10098.                         Open (a reference to File "Mac:Comm:TCP
  10099. Tools:InterSLIP Setup")
  10100.                         quit
  10101.                 end tell
  10102.                 set i to i + 1
  10103.         else if i = 2 then
  10104.                 tell application "InterSLIP/AE"
  10105.                         set status to (Get Status ID)
  10106.                 end tell
  10107.                 if status = 0 then
  10108.                         AutoType "m" holding "control"
  10109.                 else if status = 4 then
  10110.                         set i to i + 1
  10111.                 end if
  10112.         else if i > 2 then
  10113.                 set i to i + 1
  10114.         end if
  10115.         if i = 5 then
  10116.                 --tell application "InterSLIP/AE" to quit
  10117.                 quit
  10118.         end if
  10119.         return 2
  10120. end idle
  10121.  
  10122. ------------------------------------------------------------------------------
  10123. David Ray                Dream Designs          Music Composition
  10124. daver@netcom.com         PO Box 5631            Interactive Multimedia
  10125. 510-527-9010             Berkeley CA 94705      Virtual Worlds
  10126. =========================================================================
  10127. Date:         Tue, 26 Apr 1994 09:31:56 +0930
  10128. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10129. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10130. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  10131. Subject:      Coercing into a reference (dead & buried already?)
  10132.  
  10133. People,
  10134.  
  10135. Sorry if this occurs after the discussion is dead and buried, but we just
  10136. had a long weekend here in Australia (ANZAC Day), and I'm a little bit
  10137. behind.
  10138.  
  10139. On Fri, 22 Apr 1994 07:52:39 Roy Rapoport wrote :
  10140.  
  10141. >I've got an interesting problem:
  10142. >I'm processing a FileMaker Pro database with AppleScript.  In it, I'm trying
  10143. >to count the instances of each different answer in a field called 'product'.
  10144. >It's not *that* difficult, since there's only 14 different products (and it's
  10145. >not easy enough to be done through an FMPro script).
  10146.  
  10147. And he titled it "Coercing into a reference."  He went on to say that his
  10148. solution worked OK but that it was...
  10149.  
  10150. >This is, to use a mild understatement, *SLOW*.  Current rate is 2.1
  10151. >records/second.  I'd like to make it faster...
  10152. >
  10153. >Suggestions? Comments? Sneering remarks about newbies? :)
  10154.  
  10155. Well, I STILL classify myself as a "newby", so here goes...
  10156.  
  10157. I got AS 1.1 bundled with HyperCard 2.2, and LO! there is an example stack
  10158. called "Applescript Library" upon which I have based ALL my AS to date
  10159. using FileMakerPro.  In this stack are TWO examples of controlling FMPro,
  10160. one which simply returns all the field names in an FMPro database, and the
  10161. other which (and I quote) :
  10162.  
  10163. "This script builds a list of all unique values for a particular field, and
  10164. the number of records that have each value, for FileMaker Pro's active
  10165. database."
  10166.  
  10167. I have not timed the code, so it may be even more horrifically slow than
  10168. what you've already got, but it does work (at least from HC).
  10169.  
  10170. The *major* delays are still in the OS, as simple searches in FMPro are
  10171. almost instantaneous, yet via AS from HC can take 20 seconds or more!
  10172. Trying to improve the speed of your "counting" code probably won't help
  10173. much, as the bottleneck seems to occur in moving from record to record in
  10174. FMPro via AS.  For me to just move to the next record can take up to 5
  10175. seconds!  [I'm open to being shot down in flames if I've reported incorrect
  10176. stuff here, but I am still a beginner.]
  10177.  
  10178. Hope its not too late, and that this helps somewhat.
  10179.  
  10180. Best --
  10181.  
  10182.  
  10183. Paul J. Stoll
  10184. Computer Systems Officer
  10185. Computer Assisted Learning Unit
  10186. Flinders University of South Australia
  10187. Flinders Medical Centre
  10188. Bedford Park.  5042.
  10189. South Australia.
  10190.  
  10191. Ph. : (08) 204 4163
  10192. Fax : (08) 277 0085
  10193. =========================================================================
  10194. Date:         Tue, 26 Apr 1994 09:39:16 +0930
  10195. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10196. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10197. From:         Paul Baily <paulb@RANDOMSA.COM.AU>
  10198. Subject:      [Repost] deleting parts of a variable?
  10199.  
  10200. Hi folks,
  10201.  
  10202. [Apologies if this is the second time you've read this, the first time I
  10203. posted it, the only response I got was a deafening silence so I'm not even
  10204. sure the message got out.]
  10205.  
  10206. At the risk of asking an embarassingly easy question, how do I delete a
  10207. word or a text item from a variable within AppleScript (1.1)?
  10208.  
  10209. In HyperCard, what I'd do is something like:
  10210.  
  10211.    put "I don't eat snails.  I prefer fast food." into theVar
  10212. [...]
  10213.    delete word 7 of theVar
  10214.  
  10215. with the result of "I don't eat snails.  I prefer food."
  10216.  
  10217. ...but within AppleScript (using 'copy...to' instead of 'put...into' of
  10218. course) this produces this error:
  10219.  
  10220. word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  10221. delete message.
  10222.  
  10223. Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  10224. tried other alternatives like using text items, using 'set word 7 of theVar
  10225. to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  10226. driving me batty. Could some kind soul enlighten me so I can put the whole
  10227. experience behind me and get some sleep? :-)
  10228.  
  10229. Thanks in advance,
  10230.  
  10231. Paul.
  10232.  
  10233. --
  10234. _________________________________________________________________________
  10235. Paul Baily, Consulting SE       |                   paulb@randomsa.com.au
  10236.                                 |                    AppleLink:  AUST0370
  10237. ))/\ Random Access              |                   CompuServe: 73320,667
  10238.  \\\\Adelaide, South Australia  |Where we're going, we don't *need* roads
  10239. =========================================================================
  10240. Date:         Tue, 26 Apr 1994 08:33:23 CDT
  10241. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10242. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10243. From:         Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
  10244. Subject:      What Apps are running
  10245. In-Reply-To:  <9404260936.AA19714@ast1.spa.umn.edu>; from "Automatic digest
  10246.               processor" at Apr 26, 94 12:00 am
  10247.  
  10248. Can anyone tell me a method for determining what applications are running?
  10249. I need to close all apps before running a reset script I've written.
  10250.  
  10251. Any help would be appreciated.
  10252.  
  10253. -- Courtney Ann Nieman
  10254. -- Computer Instructor
  10255. -- Science Musuem of Minnesota
  10256. -- (612) 221-9462
  10257. -- havens@ast1.spa.umn.edu
  10258. =========================================================================
  10259. Date:         Tue, 26 Apr 1994 09:49:16 -0400
  10260. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10261. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10262. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  10263. Subject:      Test - Anyone have success turning off "acknowlegements" - 
  10264. NOACK??
  10265.  
  10266. Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
  10267. the list server and had it stick?  It keeps turning ACK back on for some
  10268. reason....
  10269.  
  10270. Steve
  10271.  
  10272. ---------------------
  10273.  jonke@gsfc.nasa.gov
  10274. ---------------------
  10275. =========================================================================
  10276. Date:         Tue, 26 Apr 1994 10:52:15 -0400
  10277. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10278. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10279. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  10280. Subject:      Re: Test - Anyone have success turning off "acknowlegements" -
  10281.               NOACK??
  10282. In-Reply-To:  <no.id> from "Stephen Jonke" at Apr 26, 94 09:49:16 am
  10283.  
  10284. --Stephen Jonke wrote:
  10285. >
  10286. >Has anyone tried and successfully sent the SET MACSCRPT NOACK command to
  10287. >the list server and had it stick?  It keeps turning ACK back on for some
  10288. >reason....
  10289.  
  10290.     Well, it certainly doesn't do that for me. I have my options set to
  10291. MAIL, NOACK and REPRO just like I do for all of the listservs that I'm
  10292. on. Have you tried to unsubscribe, and the re-subscribe?
  10293.  
  10294. -Hades
  10295. =========================================================================
  10296. Date:         Tue, 26 Apr 1994 08:19:49 U
  10297. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10298. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10299. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  10300. Subject:      Getting Index
  10301.  
  10302. Getting Index
  10303. There's a way to get the list of different values in a FileMaker Pro database
  10304. (Edit, Paste Special, Paste from Index).  Does anyone know how to get that
  10305. index from FMPro with AppleScript?
  10306.  
  10307. -roy
  10308. =========================================================================
  10309. Date:         Tue, 26 Apr 1994 13:23:19 -0400
  10310. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10311. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10312. From:         John Schettino <js12@GTE.COM>
  10313. Subject:      Re: [Repost] deleting parts of a variable?
  10314.  
  10315. paulb@randomsa.com.au wrote:
  10316. >Hi folks,
  10317. >At the risk of asking an embarassingly easy question, how do I delete a
  10318. >word or a text item from a variable within AppleScript (1.1)?
  10319. >
  10320. >In HyperCard, what I'd do is something like:
  10321. >
  10322. >   put "I don't eat snails.  I prefer fast food." into theVar
  10323. >[...]
  10324. >   delete word 7 of theVar
  10325. >
  10326. >with the result of "I don't eat snails.  I prefer food."
  10327. >
  10328. >...but within AppleScript (using 'copy...to' instead of 'put...into' of
  10329. >course) this produces this error:
  10330. >
  10331. >word 7 of "I don't eat snails.  I prefer fast food." doesn't understand the
  10332. >delete message.
  10333. >
  10334. >Going from that, I'm guessing I'm referencing theVar incorrectly, but I've
  10335. >tried other alternatives like using text items, using 'set word 7 of theVar
  10336. >to "" ' but to no avail. I'm sure I'm missing something obvious, but it's
  10337. >driving me batty. Could some kind soul enlighten me so I can put the whole
  10338. >experience behind me and get some sleep? :-)
  10339. >
  10340.  
  10341. Paul (and others)
  10342. repeat after me... AppleScript is not HyperTalk....
  10343.  
  10344. Alas, in the AS language guide, you will find that strings or text are
  10345. read-only objects. You cannot modify directly any string using anything
  10346. other than set or copy. For your example, you could do the following:
  10347.  
  10348. set theVar to "I don't eat snails.  I prefer fast food."
  10349.  
  10350. -- delete word 7
  10351. set theVar to text from word 1 to word 6 of theVar & " " & text from word 8
  10352. to word (number of words in theVar) of theVar
  10353.  
  10354. That's the best you can do with AS1.1.
  10355.  
  10356. - john
  10357.  
  10358. -----------------------------------------
  10359. js12@gte.com             GTE Laboratories
  10360. John Schettino                Waltham, MA
  10361. =========================================================================
  10362. Date:         Tue, 26 Apr 1994 14:38:00 -0400
  10363. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10364. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10365. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  10366. From:         ab026@FREENET.CARLETON.CA
  10367. Subject:      Re: Menu Events
  10368.  
  10369. Jeremy Quinn writes:
  10370.  
  10371. >I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  10372. >
  10373. >I am having some problems using the files in the archive.
  10374. >
  10375. >The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  10376. >aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  10377. >
  10378. >The (AppleScript) sample script will not pass the syntax check.
  10379. >
  10380. >I can't really work out how to use any of it.
  10381. >Has anyone got any sample scripts for Frontier?
  10382.  
  10383. Menu Events Scripting Addition does not implement an 'osax' handler.
  10384. It is only a dictionary ('aete').  The basic Apple Script Editor uses
  10385. any 'aete' resources it finds in the Scripting Additions folder to
  10386. syntax-check its scripts.  Not being a Frontier user, I can't comment
  10387. on how things would be different in that environment.
  10388.  
  10389. The actual code to support Menu events is a separate system extension,
  10390. so that it can work in the absence of any scripting system.
  10391.  
  10392. Ross Brown - AWOL Software Productions
  10393. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  10394. publisher of AWOL Utilities - "the best deal in freeware!"
  10395. ab026@freenet.carleton.ca
  10396. =========================================================================
  10397. Date:         Tue, 26 Apr 1994 13:25:45 -0700
  10398. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10399. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10400. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  10401. Subject:      Re: Menu Events
  10402.  
  10403. Jeremy Quinn sez...
  10404.  
  10405. >I just picked up Menu Events 1.1.2 from gaea, hoping to use it with Frontier.
  10406. >
  10407. >I am having some problems using the files in the archive.
  10408. >
  10409. >The OSAX "Menu Events Scripting Addition" contains no CODE resource, just
  10410. >aete, STR and vers, consequentially "Load OSAX" droplet won't touch it.
  10411. >
  10412. >The (AppleScript) sample script will not pass the syntax check.
  10413. >
  10414. >I can't really work out how to use any of it.
  10415. >Has anyone got any sample scripts for Frontier?
  10416.  
  10417. I hadn't cared about Menu Events, so I hadn't looked at it.  However, given
  10418. the explanation that Ross has provided, it would appear that:
  10419.  
  10420. 1.  Something (presumably a faceless background app) is likely running, and
  10421. has some System handlers installed to catch events (alternatively, it
  10422. accepts events directed to its process based on signature).
  10423.  
  10424. 2.  These events are described in the aete in "Menu Events Scripting Addition".
  10425.  
  10426. 3.  It is likely that the 'aete' parser which is part of the Commercial
  10427. Developers Suite (shipped with Frontier 3.x) can probably be induced to
  10428. write the glue needed to connect Frontier with the Menu Events extension
  10429. thing.  I would have to research how, but that would be the place to look.
  10430.  
  10431.    --John
  10432.  
  10433. --
  10434. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  10435. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  10436. =========================================================================
  10437. Date:         Tue, 26 Apr 1994 16:52:00 -0400
  10438. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10439. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10440. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  10441. From:         ab026@FREENET.CARLETON.CA
  10442. Subject:      Re: Menu Events
  10443.  
  10444. John W. Baxter writes:
  10445.  
  10446. >I hadn't cared about Menu Events, so I hadn't looked at it.  However, given
  10447. >the explanation that Ross has provided, it would appear that:
  10448. >
  10449. >1.  Something (presumably a faceless background app) is likely running, and
  10450. >has some System handlers installed to catch events (alternatively, it
  10451. >accepts events directed to its process based on signature).
  10452.  
  10453. The Menu Events system extension adds a system Apple event handler which
  10454. catches events sent to any high-level-event-aware application (unless that
  10455. application has bound an obnoxious total-wildcard handler over everything,
  10456. prime example being Microsoft Word).  There's no FBA involved.  It also
  10457. patches the menu selection trap to enable script recording of real menu
  10458. selections, but that's beside the point we're discussing.
  10459.  
  10460. >2.  These events are described in the aete in "Menu Events Scripting
  10461. Addition".
  10462.  
  10463. Yes.
  10464.  
  10465. >3.  It is likely that the 'aete' parser which is part of the Commercial
  10466. >Developers Suite (shipped with Frontier 3.x) can probably be induced to
  10467. >write the glue needed to connect Frontier with the Menu Events extension
  10468. >thing.  I would have to research how, but that would be the place to look.
  10469.  
  10470. Can't say, but I'm sure you can manage it, John!  :-)
  10471.  
  10472. Ross Brown - AWOL Software Productions
  10473. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  10474. publisher of AWOL Utilities - "the best deal in freeware!"
  10475. ab026@freenet.carleton.ca
  10476. =========================================================================
  10477. Date:         Wed, 27 Apr 1994 11:20:27 +1000
  10478. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10479. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10480. From:         Michael Bradshaw <mbradsh@EXTRO.UCC.SU.OZ.AU>
  10481. Subject:      AppleScript problem
  10482.  
  10483. I'm having a frustrating experience trying to use AppleScript to script
  10484. programs over a network, and I would appreciate any help.
  10485.  
  10486. The problem I'm getting is in simply trying to activate a remote
  10487. application.
  10488.  
  10489. Whenever I send an activate command to a valid file path and node name, I
  10490. get an error -919.  I've checked all settings and I'm sure everything
  10491. required is correct:  program linking is switched on in the remote
  10492. application, there is only one zone so no zone specifier is needed, both
  10493. sender and target machine are running AppleScript 1.1 under System 7.1.
  10494.  
  10495. A clue to the problem is in the result returned from the following script:
  10496.  
  10497. ------------------------------------------------------------------------
  10498. set applicationName to "Happy HD:Word Processing:Microsoft Word
  10499. 5.1a:Microsoft Word"  -- no word wrap in actual script
  10500. set machineName to "Library IIvx"
  10501.  
  10502. try
  10503.         activate application applicationName of machine machineName
  10504. on error errMsg number errNum from suspect
  10505.         display dialog errMsg & return & errNum buttons {"OK"}
  10506.         get suspect
  10507. end try
  10508. -----------------------------------------------------------------------
  10509.  
  10510. The Result:
  10511. application "Happy HD:Word Processing:Microsof
  10512. machine "Library IIvx"
  10513.  
  10514. Notice that the "Microsoft Word 5.1a" part has been slightly scrambled.
  10515. A similar thing happens with other applications, EG
  10516.  
  10517. The Result:
  10518. application "Happy HD:Data Management:Claris F
  10519. Pro" of machine "Library IIvx"
  10520.  
  10521. where "Claris Filemaker Pro" has become "Claris F=aker Pro"
  10522.  
  10523. The same error message occurs if the names are specified directly without
  10524. variables.  I have no idea why the application name has been scrambled and
  10525. the whole problem has me baffled.  I would greatly appreciate any assistance.
  10526.  
  10527. Michael Bradshaw
  10528. mbradsh@ucc.su.oz.au
  10529. =========================================================================
  10530. Date:         Wed, 27 Apr 1994 00:20:51 -0700
  10531. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10532. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10533. From:         Jon Pugh <jonpugh@NETCOM.COM>
  10534. Subject:      Re: AppleScript is not HyperTalk...
  10535.  
  10536. >repeat after me... AppleScript is not HyperTalk....
  10537.  
  10538. Good thing too.  HyperTalk has a different set of problems.  Like a really
  10539. lame compiler.  ;)_
  10540.  
  10541. >>...but within AppleScript (using 'copy...to' instead of 'put...into' of
  10542. >>course) this produces this error:
  10543.  
  10544. However, in deference to Hypercard, AppleScript 1.1 allows you to use
  10545. "put...into".  It just changes it to "copy...to" when you compile.
  10546.  
  10547. Jon
  10548.  
  10549. Sometimes you feel like a .sig, sometimes you don't.
  10550. =========================================================================
  10551. Date:         Wed, 27 Apr 1994 03:34:12 -0400
  10552. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10553. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10554. From:         Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
  10555. Subject:      AS interpreter?
  10556.  
  10557.         I wonder whether anyone is working on a command line interface for
  10558. the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  10559. difficult to do. I would enjoy being able to use my Mac remotely over a
  10560. vt100 emulation or worse. Besides, it would be fun to try editing text files
  10561. interactively using AppleScript commands. On the other hand, the command
  10562. interpreter would have to be sure to catch run-time errors whenever
  10563. possible.
  10564.         Since many users of this list know more about Mac programming than I do
  10565. (I've been hoping to sublimate my desire to learn real Mac programming by
  10566. AppleScripting) I'd like to ask them:
  10567.  
  10568. 1) I believe the Communications Toolbox can be used to provide terminal
  10569. I/O to a program whether the program is used locally or remotely.
  10570. Is that correct?
  10571.         If not, the discussion on the alt.mac.os list has confused me.
  10572. I was unable connect a session of Microphone LT to a session of a copy
  10573. of Microphone LT, but that doesn't prove anything. In a few minutes I'll
  10574. try Termy.
  10575.  
  10576. 2) A more iffy proposition:
  10577.    Supposing that one had an AppleScript-based command interpreter
  10578. responding to a connection through the CTB, could the interpreter
  10579. send the remote user through the usual AppleTalk log-in process?
  10580. Could the remote user be fit into the AppleTalk Users & Groups scheme?
  10581. =========================================================================
  10582. Date:         Wed, 27 Apr 1994 06:57:34 -0400
  10583. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10584. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10585. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  10586. Subject:      Re: AS interpreter?
  10587.  
  10588. At  3:34 AM 4/27/94 -0400, Aaron Mansheim wrote:
  10589. >        I wonder whether anyone is working on a command line interface for
  10590. >the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  10591. >difficult to do. I would enjoy being able to use my Mac remotely over a
  10592. >vt100 emulation or worse. Besides, it would be fun to try editing text files
  10593. >interactively using AppleScript commands. On the other hand, the command
  10594. >interpreter would have to be sure to catch run-time errors whenever
  10595. >possible.
  10596.  
  10597. Check out Script Daemon, by Peter Lewis, if you have MacTCP.  Script Daemon
  10598. allows you to telnet to your Mac and enter AppleScript commands.  Only the
  10599. owner can log in (using the Owner name&password).
  10600.  
  10601. Bob
  10602.  
  10603. --
  10604. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  10605. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  10606.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  10607. =========================================================================
  10608. Date:         Wed, 27 Apr 1994 08:17:06 -0500
  10609. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10610. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10611. From:         King Rhoton <king@ACPUB.DUKE.EDU>
  10612. Subject:      Re: AS interpreter?
  10613.  
  10614. >        I wonder whether anyone is working on a command line interface for
  10615. >the Mac built on AppleScript. It might be slow, but doesn't seem utterly
  10616. >difficult to do. I would enjoy being able to use my Mac remotely over a
  10617. >vt100 emulation or worse. Besides, it would be fun to try editing text files
  10618. >interactively using AppleScript commands. On the other hand, the command
  10619. >interpreter would have to be sure to catch run-time errors whenever
  10620. >possible.
  10621.  
  10622. Well, if you've got MacTCP, I believe what you ask has already been done by
  10623. Peter Lewis.  Grab yourself a copy of ScriptDaemon, and slap it into your
  10624. Startup Items folder.  With MacTCP installed, it allows you to telnet into
  10625. your Mac, login (based on users and groups), and enter applescript commands
  10626. at a command prompt (the applesoft prompt--I got a good chuckle at that).
  10627. Even multi-line commands (scripts) are supported.
  10628.  
  10629. King Rhoton                                             king@acpub.duke.edu
  10630. =========================================================================
  10631. Date:         Wed, 27 Apr 1994 08:25:53 -0400
  10632. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10633. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10634. From:         Frank Lowney <flowney@MAIL.GAC.PEACHNET.EDU>
  10635. Subject:      Eudora & HyperCard
  10636.  
  10637. Tom,
  10638.  
  10639. We've got a check made out to you in the amount of $300, all ready to send
  10640. when we finish this little project.  How's it coming?
  10641.  
  10642.  
  10643. *********************************************************************
  10644. Dr. Frank Lowney, Director, Regional Teacher Education Center
  10645.                   System Administrator, The GC EduNET Project
  10646. CBX 034, School of Education
  10647. Georgia College, Milledgeville, GA 31061-0490
  10648. Voice: (912) 453-5121
  10649. via GC EduNET, Georgia's Statewide K-12 Education Network, telnet to:
  10650.         gcedunet.peachnet.edu
  10651. *********************************************************************
  10652. =========================================================================
  10653. Date:         Wed, 27 Apr 1994 12:54:27 GMT
  10654. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10655. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10656. From:         "Robert K. Terra" <Robert_Terra@BROWN.EDU>
  10657. Organization: Brown University
  10658. Subject:      Omitting a small list from a larger list
  10659.  
  10660. Hi All,
  10661.  
  10662. I have a list of folders, say 50 folders. I want to copy something to all
  10663. but 3 of those folders.  Is there any way, besides using nested "if-then's"
  10664. (in case 3 folders grows to 10 folders, I don't want to use 10 nested
  10665. if-then's) to accomplish this. I've tried using a variety(?) of "Repeat"
  10666. loops but can't get it the right way. What I want to do is:
  10667.  
  10668.  
  10669.                                                         for the first folder 
  10670. (of
  10671.  the 50)
  10672.                                compare it to all of the folders in the list of 
  10673. 3
  10674.  folders
  10675.                                              if they are equal (or contains, 
  10676. etc
  10677. ) then don't copy
  10678. something
  10679.                        to that folder
  10680.                  move on to the second folder (of the 50)
  10681.  
  10682. This works, but I'm having trouble inserting another repeat loop and still
  10683. only going through the 'big' list once:
  10684.  
  10685. set userVolume to "Admission.Users:"
  10686. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  10687.                      "Admission.Users:SUPLOAD"}
  10688. tell finderLib
  10689.         repeat with currentFolder in (listFiles at userVolume)
  10690.                 set allInfo to info for alias currentFolder
  10691.                 set isFolder to allInfo's folder
  10692.                 set isLocked to allInfo's locked
  10693.                 if currentFolder does not contain "DELETED.SAV" then
  10694.                         if currentFolder does not contain "RTERRA" then
  10695.                                 if currentFolder does not contain "SUPLOAD" 
  10696. then
  10697.                                         if isFolder and not isLocked then
  10698.                                                 ** DO SOMETHING HERE ** 
  10699. (copyFil
  10700. es, beep, whatever)
  10701.                                         end if
  10702.                                 end if
  10703.                         end if
  10704.                 end if
  10705.         end repeat
  10706. end tell
  10707.  
  10708.  
  10709. sorry for the length of post, hope I gave enough info. & it makes sense
  10710. PS: still using v. 1.0
  10711.  
  10712. Thx in advance for your help.
  10713. BobT
  10714. =========================================================================
  10715. Date:         Wed, 27 Apr 1994 06:36:00 PDT
  10716. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10717. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10718. From:         Mark Alldritt <alldritt@WIMSEY.COM>
  10719. Subject:      Re: What Apps are running
  10720.  
  10721. >Date:    Tue, 26 Apr 1994 08:33:23 CDT
  10722. >From:    Steve Havens - SMM <havens@ASTRO.SPA.UMN.EDU>
  10723. >Subject: What Apps are running
  10724. >
  10725. >Can anyone tell me a method for determining what applications are running?
  10726. >I need to close all apps before running a reset script I've written.
  10727. >
  10728. >Any help would be appreciated.
  10729.  
  10730. Try using the list processes command in my Script Tools package.  I think
  10731. there is a similar command in the GTQ Scripting Library.
  10732.  
  10733. -Mark
  10734. =========================================================================
  10735. Date:         Wed, 27 Apr 1994 07:33:51 PDT
  10736. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10737. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10738. From:         Neil Rest <neilrest@ECOTONE.TOAD.COM>
  10739. Subject:      Re: AS interpreter?
  10740.  
  10741. Lack of a command line has been one of the Mac's most awful cripplings all
  10742.  along.
  10743. It is 99 44/100% superior to DOS -- but cannot batch file!!
  10744.         Neil
  10745. =========================================================================
  10746. Date:         Wed, 27 Apr 1994 23:26:34 +0800
  10747. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10748. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  10749. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  10750. Subject:      Mail document to person as Eudora Attachment
  10751.  
  10752. --========================_17162796==_
  10753. Content-Type: text/plain; charset="macintosh"
  10754. Content-Transfer-Encoding: quoted-printable
  10755.  
  10756. The attached file is an applet that takes any file droped onto it and mails
  10757. it off to the person specified in the file.  I would change it to a bogus
  10758. email address as the default, except something seems to have happened to my
  10759. Applescript installation and I'm not entirely sure that modifying the one
  10760. that Quinn sent to me would be a good plan.
  10761.  
  10762. The applet has been sent to Steve Dorner for inclusion in the scripts
  10763. directory on ftp.qualcomm.com.
  10764.  
  10765. The applet is most likely public domain.  To Quote Quinn and Peter from the
  10766. comments "As far as we=D5re concerned you can do whatever you like with this
  10767. script."
  10768.  
  10769. Please look at this file and modify it before testing it out.  Peter
  10770. doesn't want your attachments!
  10771.  
  10772. Share and Enjoy,
  10773. Craig
  10774.  
  10775.  
  10776.  
  10777. --========================_17162796==_
  10778. Content-Type: application/mac-binhex40; name="Mail_To_Peter"
  10779. Content-Disposition: attachment; filename="Mail_To_Peter"
  10780.  
  10781. (This file must be converted with BinHex 4.0)
  10782.  
  10783. :$8eKD@`J9'mJ8'9dCA)!39"36'4`E(3K!!!!!!!!!#99SdS!!!!!!3!!!#1R!!!
  10784. LT`!!!Dk,!!!!!!!"rrm8!"ZR!+QPp!#!rrm!!"bA!!!!!!!!r`e0B@PX)&4[)&"
  10785. PG'9b!J!!!%&38%aNF'ad)!!!!!!!!!""8&"-C("XG#!!!!!!!!!!!!!!!!!!!!!
  10786. !!!!!!!!!!+RNDP%!!!!!!!!P93!!!!#Arrm!!#!)!+QTd!#Arrm!!#"-!!!!!1R
  10787. !rrm!!#(6!!!!!2rrrrm!!#(T!!!!!!#!rrm!!#(h!!!!!2G58p*MrCZQF"'L%aF
  10788. ij*KQ6Q3MMY-U-MQIqSI#*k-c$2F&hFe*4&RI#85B`V&)Vfc!9'XUmdMHF#`MQ38
  10789. *jj`M#D`!!!"i!!!!!!!)!!!!!!!!!!!!!!!!!!$rrrrr!!!!0!!!!#3!!!!!)'m
  10790. !"+"I)'m!"+%SS#01G808Eb"bG@iJG'KTFb"cBh*TF(3JBA"`E'PMBA4TEfiX)(P
  10791. [G5"YGA0d)'CTFR0d)'PZFh4KE'`J3A"`E'96Bh*TF(3Z!!!!'N!!!!!!!!!!!!!
  10792. !!!!!!!!!!!!!!!!!!!!!!!!DG%CKFf4939-J-5ia-$%Z-6!1!!!!"!rrr`!"!!)
  10793. !!`(rr`!!$3!"!!&V!!!!!!!!!!3#!!3!!J!&!!B0!!8!!Q`!!3!!!!$rrJ!(!Ir
  10794. q!!!-!!F!&`!4)%eKD@`J9'mJ8'9dCA)J+$S!!J!!!J!'!!)!#!!*$3!)!!*X!!%
  10795. !!!!!rrd!#J(rr3!!$!!+!#`!*L#T)&"PG'9b)%aPGfPc)'&ZC#"4G@PZEL$59'K
  10796. P)%9cDfPYEb(6!!)!!!)!#3!#!!X!$!d!#`!#E!!"!!!!!2rm!!d"rr`!!!`!$3!
  10797. 5!!`J-MFJ3A"b)$%j163!!J!!!J!-!!)!$J!2$3!1!!*X!!%!!!!!rrX!%!(rq`!
  10798. !$!!3!%m!55""Fb"QBA)JBA-JGfA9FQ8JBfpZBf9bEQ9N)(P[G5"MB@iJC'mJGfK
  10799. KG'9fCA)JH@pe)'aTDf8JGfPdD#"dD'Pc)(0MFQP`G#i!!J!!!J!2!!)!%3!5$3!
  10800. 4!!*X!!%!!!!!rrS!%`(rqJ!!$!!6!$i!1#"#BA0PC#"[EL"dD'8J8Q9aG@9cG#"
  10801. &G@4[FQ%J5@jQEb"cBh*TF(3JBRNJ8h4PGQ8J4'pbEQ9b!!)!!!)!%J!#!"3!&3d
  10802. !&!!#E!!"!!!!!2rjrrJ"rrN!!!(rq!!!!J!9!!)!&J!A$3!@!!*X!!%!!!!!rrI
  10803. rpJ(rp`!!!Irf!!!#!"F!!J!B!"N0!"J!!Q`!!3!!!!$rp3!D!Ire!!!-!"S!2J!
  10804. i)&4SC5"dFQPMDhNJF'&bG#"dEb"dD'Pc)(0MFQP`G#"hBA-JG'KP)(GPDA*N)(0
  10805. jER4KH#"QEh)!!J!!!J!C!!)!'`!F$3!E!!*X!!%!!!!!rr3!(3(rp!!!$!!G!%N
  10806. !3b"MFQ9KG'PZCb"K)'jPGb"YCA0cB@GP,L!J9'KTFb"hD@aX)'9fC@jdG@&XE(N
  10807. JBQ8JCQPiC@3JD@iJ4A9NEh*K*h-!!J!!!J!F!!)!(J!I$3!H!!*X!!%!!!!!rr-
  10808. !)!(rm`!!$!!J!"i!'#""F("XC90MFQP`G#"ND@0dD@pZBA*j,J!#!!!#!"m!!J!
  10809. K!#)0!#%!!Q`!!3!!!!$rm[ra!Irb!!!"rr%!!!)!)J!#!#-!*!d!)`!#E!!"!!!
  10810. !!2r`!#8"rr!!!!`!*3"(!%%J5@e`Eh*dB@jd)(4TF$SJ)#*0CA0cB@GP)$!L)'P
  10811. c)(0SEh*dD'&ZC#"QEh)JG'KP)'0eFR*PER3JE@9cFf&RC3!#!!!#!#3!!J!Q!#F
  10812. 0!#B!!Q`!!3!!!!$rlrrZ!Ir[!!!"rqi!!!)!*`!#!#J!+3d!+!!#E!!"!!!!!2r
  10813. Y!#S"rqd!!!`!+J"'!%!J9'KP)(4bD@0VH5"`BA*d)'pQ)(4SDA-JFf0bDA"d)#T
  10814. ZEhFU)'Pc)(4SC5"PGQPX)'&`F'aTBf&dD@pZ)'pQ!!)!!!)!+3!#!#X!,!d!+`!
  10815. #E!!"!!!!!2rX!#d"rq`!!!`!,3!h!$%JBf&cG#"dEb"PH(4bB@0d)(4SC5"3BA*
  10816. *4#"QFQpY)'&Z)%C68h"PBbiJ)&9bCfJK!!)!!!)!,!!#!#i!,`d!,J!#E!!#!!!
  10817. !!2rVrqS"rqX!!!(rkJ!!!J![!!)!-!!a$3!`!!*U!!!!!!!#rqN!-J[rk3!0-!!
  10818. *FQ9MDA"TC@jd!!!0!$)!!@d!!!!!!!%!-``!-`!N!"j`CA4PFLjXCAGTFd"TEQC
  10819. [,Q0eFR4TELjPC(8ZBA8!!J!!!J!a!!)!0!!e$3!d!!*X!!)!!!!!rqMrj`(rk!!
  10820. !!IrR!!!#!$8!!J!f!$F0!$B!!QN!!!!$!!B!1!!j$3!i!!0*!!)!!!!!rqB!1[r
  10821. P#[rQ!"JZB@9fG'pNEf0ZG@aX!!#!!!!!%!"KE'Pc$3!k!!&[!!!!!!!!rq3,rq3
  10822. !$6!!#@CTE'9IE'PcG!!!![rP!!!0!$N!!@X!!!!!!#d!1`)!1`!#!$`!23d!2!!
  10823. #E!!"!!!!!2rM!$i"rq-!!!`!2J",!%8JFQ9MC@PfC5"dD'8JC(*[F("PC#"QD@a
  10824. PFb"KEQ3JBR9TE'3JB@iJBA"`FQp`FQPKG'8JBA4dB@0SE@9ZG#"cG(*TEQF!!J!
  10825. !!J!p!!)!2`"!$3!r!!*c!!!!!!!%!%%!3Jd!33!"E3!!!!!!!3"$$!"$!!B!!!!
  10826. #!!!0!%)!!@m!!!!!!!$riJ[riJ!2-!!,BA4dB@0SE@9ZG(-!!!)!3!!#!%3!43d
  10827. !4!!$@!!!!!8!*J"'rq%!4`d!4J!#FJ!!!"8!)3")!%N0!%J!!Q)!!!!9!"m!5J"
  10828. ,$3"+!!*L!!!!&3!G!%`!63d!6!!"E`!!!"8!&[rJ#rrJ!!m`!!YKG(4KBfKYC@j
  10829. dF`!!$3"0!!0*!!!!&J!Frpm!6[rH#rrI!#!`!!jKE'PKFh4[E@pZFh4PFJ!1B@a
  10830. TBA08Ede[ER0dCA)#!%i!!J"2rpd0!%m!!@m!!!!A!"Mrh![rh!!&-!!"D3!!![r
  10831. G!!!#rpi!!!d!5`!"E3!!!"d!(J"3$!"3!!F!!5!!!J!!$3"*!!&[!!!!!!!!rpX
  10832. ,rpX!$c!!#f&dG'&MD'ePER4c!!!,rq%!"6!!!@N!!!d!4`!"E`!!!!J!#IrD#rr
  10833. D!!d`!!PQD@aPAfaTFh3!!!)!43!#!&(rf3d!83!$53!!!#F!,IrB!&,re`[rf!!
  10834. 3-!!'C'pcC@jN!!CNEe0PEQ3#!&)!!J"6rpB0!&-!!@m!!!!S!#Rre3[re3!2-!!
  10835. ,BA4dB@0SE@9ZG(-!!!,reJ!!![rA!!!#rpN!!!)!0`!#!&3!93d!9!!#E!!#!!!
  10836. !!2r8rp-"rp3!!!(rd`!!!J"9!!)!9J"A$3"@!!*T!!!!"`!+!&J!@3d!@!!$53!
  10837. !!!!!!2r5!&Vrd3[rdJ!J-!!1B@aTBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9
  10838. b!J"D!!)!@rr3$3"E!!&[!!!!!!!!rmm,rmm!$6!!#A4SC9pKE'PKF`!!![r3!!!
  10839. #rp%!!!d!@3!"D`!!!!!!4!"F!J"F!!)!A3"H$3"G!!*X!!%!!!!!rmi!A`(rcJ!
  10840. !$!"I!%i!5#"MEfjfCA*d)'&Z)'&XD@&c)(4[)(4SC5"QEh*YBA3JFQ9aG@PbC@3
  10841. JBRNJ4A9NEh*KeA-J@#e"G(4KBfKYC@jd)'CTC@aN,J!#!!!#!&i!!J"J!'%0!'!
  10842. !!R)!!!!!!!m!BJ"M$3"L!!0*!!)!!!!0rmd!C!"P#[r0!"JZFhPcEd0"8e3U+LS
  10843. U!!!!!!!!!!!U+LSU$3"N!!*X!!8!!!!$!'Erc!d!CJ!#B`!!!!!!!`"R!'J0!'F
  10844. !!@m!!!!!!!(rb`[rb`!0-!!*G'KPAf&XD@&c!!!0!'J!!@d!!!!"!!,rbJVrbJ!
  10845. %#QCcFb!"rm`!!!B!C3!$rmN!D3"U#[r*!!3+4P*263d!D3!"E3!!!!3!"Ir)!rr
  10846. )!!-'!'S!!rr(!'X!E!Vra`!%#P0*@N80!'X!!@d!!!!'!!IraJ2raJ!%"J"X!!2
  10847. ra3"Yrm3+rm8!"!T86b!J$3"Y!!&Y!!!!#!!*!'i-!'i!#J!%E'pZC`!#!!!'rm3
  10848. !!!d!B`!"E`!!!!!!!2r$#rr$!!i`!!9`BA*TC!!&F'&b583#!'%!!J"[!(!0!'m
  10849. !!R)!!!!3!"F!F3"b$3"a!!&+!!!!%!!6!(-#!(-!!J"drm)0!(3!!@d!!!!3!"%
  10850. !G3`!G3!(!!%k!!)!!!,r`J!!$3"b!!*Z!!-!!!!!!(B!G`d!GJ!"-3!!!"3!&[r
  10851. "#[r"!!3+G(KNE!d!G`!"-3!!!"-!&2r!#[r!!!3+BA0MFJ)!F!!#!(J!H3d!H!!
  10852. #FJ!!!"J!)!"k!(X0!(S!!Qi!!!!B!"i!I!"p$3"m!!)d!!!!'`!Hrlm!IJVr[`!
  10853. %#Q0TG'd0!(i!!@d!!!!F!"hr[J2r[J!"$3"p!!*X!!8!'!!E!(rr[3d!I`!#B`!
  10854. !!"J!'`#!!)%0!)!!!@m!!!!B!"Rr[![r[!!0-!!*G'KPAf&XD@&c!!!0!)%!!@d
  10855. !!!!C!"VrZ`VrZ`!%#P4&@&3"rld!!!d!H`!"E`!!!!!!!2qk#rqk!!X`!!GfEfa
  10856. ZB@eP!!!#!(N!!J##!)-0!))!!R)!!!!K!#N!K!#&$3#%!!*Z!!!!)3!R!)B!K`d
  10857. !KJ!#0!!!!#3!*rqj!)J+rlN!"!TMDA4Y$3#)!!&Y!!!!*3!QrlJ$rlMrr`d!K`!
  10858. #E!!&!#%!*!#*rlF0!)N!!Q-!!!!K!#3!LJ#,$3#+!!&[!!!!)3!LrlB,rlB!$6!
  10859. !#A4SC9pKE'PKF`!!$3#,!!&Y!!!!)J!Mrl8+rl8!"!T849K8!Iqh!!!0!)8!!@m
  10860. !!!!!!!$rY![rY!!*-!!&CQjKE@8!!!)!J`!#!)`!M3d!M!!#FJ!!!#S!-3#1!)m
  10861. 0!)i!!8S!!!!U!#d!N!!#!*!!!!)!NIqc$3#4!!&Y!!!!+J!V!*)-!*)!"J!!!!)
  10862. !!!,rX`!!$3#2!!*Z!!-!!!!!!*-!P!d!N`!"-3!!!#i!-2qb#[qb!!3+G(KNE!d
  10863. !P!!"-3!!!#d!,[qa#[qa!!3+BA0MFJ)!M3!#!*ArX!d!P3!"6!!!!$)!4!#@$3#
  10864. @!!*L!!!!-J"$!*F!Q!d!P`!#BJ!!!$)!2`#C!*S0!*N!!Q)!!!!b!$d!Q`#F$3#
  10865. E!!*L!!!!-J!j!*d!RJd!R3!#BJ!!!$)!0`#I!+!0!*m!!Q)!!!!b!$8!S3#L$3#
  10866. K!!&Y!!!!-J!c!+--!+-!"`!"1J!#!!!0!+)!!@m!!!!c!$6rV`[rV`!,-!!(GQp
  10867. XEQ&YC3!!$3#J!!&Y!!!!03!f!+3-!+3!"`!"1J!#!!!0!*i!!@m!!!!h!$MrVJ[
  10868. rVJ!1-!!&F'&bD@3!"A"KFNP%$3#F!!&Y!!!!13!m!+8-!+8!"`!"1J!#!!!0!*S
  10869. !!@m!!!!p!$lrV3[rV3!*-!!&CQjKE@8!!!d!Q!!"E3!!!$m!3J#Q$!#Q!!F!!6S
  10870. !!J!!![q`!!!#!&F!!J#R!+J0!+F!!Q`!!J!!!!$rV2qV!IqX!!!"rkX!!!)!U!!
  10871. #!+N!UJd!U3!#D3!!!!X!$J#V!+`0!+X!!dN!!!!!!!$rUJ#YrkN,rkS!%$!!"Q4
  10872. [Ff9ZC!!'C'p6C@jN!J#Y!!)!V[qS$3#Z!!&[!!!!!!!!rkF,rkF!$c!!#f&dG'&
  10873. MD'ePER4c!!!#rkJ!!!,rU3!!$3#X!!&V!!!!!!!q!+m#!+m!!J#`!,%0!,!!!Q`
  10874. !!3!!!!$rTJ#b!IqQ!!!-!,)!1!!b)(0PEQ3JG'KP)'ePFh0KCf8JGfPdD#"dD'8
  10875. JBA"`FQp`FQPKG'8JBA4dB@0SE@9ZG(-!!J!!!J#a!!)!XrqP$3#c!!*2!!!!!!!
  10876. q!,3!Y3d!Y!!"D`!!!!3!23#f!J#f!!)!Y`#i$3#h!!0*!!)!"!!5rk3!Z3#k#[q
  10877. N!"JZBfpbC@0bC@`U+LSU!!!!!!!!N!!!ER9XE!d!Z3!"E3!!!!3!"IqM#[qM!!3
  10878. +CA908`B!ZJ!$rk)!ZrqK#[qL!!3+D@jcD!d!Z`!#EJ!!!!B!$J#m!,d0!,`!!$X
  10879. !!!!0!!i0!,d!!Qi!!!!'!!d![J#r$3#q!!)d!!!!#J!0rk!!`!VrS!!%#Q9e68)
  10880. 0!-!!!@d!!!!,!!`!`3`!`3!*!!0[GA3!!J!!$3#r!!)d!!!!"J!+rjm!`JVrR`!
  10881. %#Q9e68B0!-)!!@d!!!!)!!N!```!``!'!!!!!J!!"[qK!!!#!,J!!J$%!-80!-3
  10882. !!R)!!!!6!#!!aJ$($3$'!!&[!!!!%`!Brji,rji!$6!!#A*PBfP`D@9ZG!!!$3$
  10883. (!!*Z!!!!!!!!!-J!b3d!b!!#0!!!!"`!(rqG!-S+rjd!"!TPG8CN$3$+!!&Y!!!
  10884. !(3!H!-X-!-X!#!!#G'm!!J!!$3$*!!)d!!!!'!!Frj`!c!VrR!!%#Q9e69-0!-`
  10885. !!@d!!!!D!"[rQ`2rQ`!!!J$&!!)!c3$1$3$0!!*b!!!!)3!U!-m!d!d!c`!"E3!
  10886. !!#%!)J$4$!$4!"-!$8CTE'8J9(*KER0QCA)!!J!!$3$3!!*Z!!!!!!!!!0)!d`d
  10887. !dJ!#0!!!!#B!+IqD!03+rjS!"!TPG8CN$3$8!!&Y!!!!*`!S!08-!08!$3!(Fh9
  10888. LDQ9MG!!#!!!0!0-!!M3!!!!L!#ErQ3$@#[qC!!3+CA908`d!eJ!"E3!!!#3!*Iq
  10889. B!rqB!!!#!-i!!J$A!0J0!0F!!R)!!!!V!$3!f3$D$3$C!!&[!!!!+`!XrjF,rjF
  10890. !$c!!#f&dG'&MD'ePER4c!!!0!0S!!Qi!!!!!!!!!f`$F$3$E!!)d!!!!-!!crjB
  10891. !h3VrPJ!%#Q9e4Q30!0d!!@d!!!!a!$)!hJ`!hJ!6!!eB,8&dG'&MD'ePER4c!!)
  10892. !!!d!h!!#0!!!!#`!-2q9!0m+rj8!"!TPG8e6$3$I!!&Y!!!!,J![rj3$rj3!!!)
  10893. !f!!#!1$rN`d!i!!$53!#!$8!2Iq5!1(rN3VrNJ!B,N066feP8A9PER9XE!!!!!!
  10894. !!!!!CA908`d!i3!#0!!!!$8!1Iq3!!$L#[q3!!!%#Q9e69-0!1)!!@d!!!!h!$M
  10895. rM`2rM`!!![q4!!!#rj-!!!d!Y3!"E3!!!!!!!3$M$`$M!KS)ER9XE!!!!!!!!Gq
  10896. !rri!!+fq"N9eC'pbB3!I9!%Db(3!$`!!)!!!&-dZ!!!!!2rr!!!I!!!!"R`!!!!
  10897. -!!!!I`!)!#!!#h6`!!YpBJ!!(e3"'N066fd!!"%!B@aTF`!!!!!"[!!#!!!(3h9
  10898. YG@aeF`!!!!!!!!!!!!!!!!!!!!!!!!!!TE(J`%*%!!!!!+fq"N9eC'pbB3!!!!!
  10899. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  10900. !!!!!!!!!TX#T)PEc39"36%066fhrrrrr!!!!&3!!!!!!!!!!!!!!!!!!!!T1CA4
  10901. hEh*VD@jR!!%!#!!!VEi!!(J,!!)!*N0eEA9XGA-k3A"`E'PMBA4TEfjc1NjPG(G
  10902. [FQYTEQFk4A9NEh*K!!N!U!#SB@C`E3!!!!!!!`!B!$N!@3"e!*8!RK499d%J3fp
  10903. YF&0MD5"(EQ4'E'p[FJ!!!!!!!!!!!!!!!!G&FQP[C'pZ!!!!!!!!!!!!!!!!!!!
  10904. !!!!!!!!!!!!!"d0eEA9XGA-!!!!!!!!!!!!!!!!!!!!!!!!!!!94G@PZEJ!!!!!
  10905. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(!#i(3h9
  10906. YG@aeF`%3rrm!!!!!!!8##%#"(2!!!!!!TE(J`!!!VEi!!+E!rrrrr`!"rrm!!!,
  10907. rT3!!!J#U!!)!j2q1$3$N!!*X!!)!!!!!rihrM!(rM3!!!Iq-!!!#rii!!!i!!J!
  10908. !$a!!!`!'riX!j3!c!1B!j`$S!Iq,!!!3!18!"2q+riRrL2q(#rq+!!d`!!PbC@0
  10909. TF'PPER3!!!VrL3!B,Q&PGR4[C'pMER9XE!!!J!!!!"!!B@aTF`[rL!!J-!!1B@a
  10910. TBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9b#rq(!"!`!!CNEh0PEQ3!"Q4[8f9
  10911. ZC!i!jJ!(%2q'!$RrKIq%!1N!k[q$#[q'!"JZB@9fG'pNEf0ZG@aX!!#!!!!!%!"
  10912. KE'Pc#rq&!!d`!!PQD@aPAfaTFh3!!!,rK!!!%!$T!!2rJ[q"ri!,ri)!$6!!#@C
  10913. TE'9IE'PcG!!!#rq"!!m`!!YKG(4KBfKYC@jdF`!!#rq!!!8`!!&T!!!3!1S!"`"
  10914. $rhrrI[pprh`!82pl#[pr!!3+DfpME!VrIJ!%#Q0[BQS+rhd!'#jMEh*PBfjdC5S
  10915. U+LS!!!!!!!!3!#SU+LS,rh`!)$!!$Q&XD@&cG'pYEfjcG'9b!!jKE'PKFe4[6@p
  10916. ZFh4PFJ[rH`!3-!!'C'pcC@jN!!CNEe0PEQ34ri-!,Z"&8E&2&`!JS&[KiQ`-!!0
  10917. VD"X!!U%USQXV!!3Pj59&X9Y2@IrZ6bUKDbX!"Jm1!1F!"a$rHJ"CrhRrH!$V!1c
  10918. rG`[rHJ!J-!!1B@aTBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9b$[pj!!)%rhB
  10919. !l32rGJ!"$J$Y!!%!rh8,rh8!$6!!#A4SC9pKE'PKF`!!![pi!!!3!1X!"2pdrh2
  10920. rF[pa#rpd!!d`!!PdD'9IB@aTBA-!!![rF`!1-!!&F'&bD@3!"A"KFNP%#rpb!!X
  10921. `!!GfEfaZB@eP!!!,rh%!#6!!"@CZB@eP!!!3!1`!%[p`rfrrE[pYrf`!E[pVrfS
  10922. !GIpTrfMrCrpQ!*)!S`#N!+8!TJVrF!!%#QCcFb!+rfm!"!T'8Np0#[pZ!!3+8dP
  10923. D432rE3!%#[pX!!3+9%mJ)!2rD`!'#[pU!"JZFhPcEd0"8e3U+LSU!!!!!!!!!!!
  10924. U+LSU#[pT!!3+BA0MFJVrD!!%#R4iC'`+rfF!"!T849K8#[pQ!!3+BfPdE4(rG`"
  10925. &S1!Qi@hLiq6PjJ`!"d@a6qKVGXRU,%C2S1XQl'X[4E*2S1XQl'N[4E02l@YfbHS
  10926. X4NrZSLA[*D%PB3!3*D-PB3!4*3m2$J$S!!F3rf8!V2pNrf-!lJ$[rf),rf8!%$!
  10927. !"Q4[Ff9ZC!!'C'p6C@jN$[pN!!)%rf%!m!2rB3!"$J$`!!%!rf!,rf!!$c!!#f&
  10928. dG'&MD'ePER4c!!!#rf-!!"!!lJ!"rem,rem!$c!!#f&dG'&MD'ePER4c!!!3!1m
  10929. !$J$MrelrAIpF!-2r@`$"reVr@3$,!0%!e3$HreJ+rei!"!TPG8e6#[pG!!3+D@j
  10930. cD!VrA!!%#Q9e68B+reX!"!TPG8e##[pD!"JZBfpbC@0bC@`U+LSU!!!!!!!!N!!
  10931. !ER9XE!Vr@3!%#Q9e4Q3+reJ!'#j$8dpYC9&eC@jeE'`!!!!!!!!!!'9e69-4rf)
  10932. !2q!5!$[KiLVMj#rPjLmfE!`!"dpL!!%!!#VKDLrSk5p'6qSUi@S[k1X[4NqJ+Z&
  10933. U,qMX,dC2+Z&U,fS-!!e9$`"KFf0b!!%!$IVHhUd!!!$Y8f9ZC(-JB@jjG'KTEQF
  10934. JH@pe)'4bEh!JEfiJDA3JG'mJG'KP)'eKD@`JB@4NFQ9cFb"cF'9MD@CTC@3JBRN
  10935. JG'KP)("bEh"PFR4j)#*bC@0TF'PPER3L,L!J@@pe)'eeFh3JD'&fC5"dD'8J8(*
  10936. [Ch*KE@ePFY9c)&4[Ef`J+'CdF$S[,fGKC@%ZDfGc,R9VB@jc,Q9NG5pKF("XCA0
  10937. MFQP`G#p[Ff&iC@i[F'GY9'p[E#jcDA3ZD(&i+5"cBh*TF(4TEQFJCAKdC@jcD@p
  10938. Z)'PZFh4KE'aPC#"dEb"eFf8JG'KTFb"cBh*TF(3Z!!!!&J!"!!!!!!!1!!S!%!!
  10939. !!!`!!!!!!!!!!!!#!!!!!!!B!!!!+!!!!!!!!!!)!!!!)!#N2c`!!DR`!!!!l!!
  10940. !!!&19[ri,`0f!#m$-$bKVDG'*KmY52ri,`-`2+LITdBQ(b!ZrrLa`'FJ,`-J2'0
  10941. `ER4"l[rm)NLKV5+)*Kp+3'B)5Ulrr'F#GJ%3!bBZrr41ANje6PB!!#m-@Bm[2%j
  10942. 29%Nr2!#!U"mSAb!-CJK`!cm!UFKJ+#m-UC)J9#!)d+J!'#&!!"JJ9#!)d+J!(#&
  10943. !!"a9Mbm8)&qJAMk!9%mSE[rm6Pj1G8j@!!![$%kkre4+!'FU@Bm[2'&`E(3[2(0
  10944. MF(4`)DJU+&mJ$'F5@Bm[$#mm!!!!!A!!U#UTp&K26VVrG#KZrra1ANje!!!!0'4
  10945. `E(3!!!!"4P*&4J!$!!!!J3!"!))!!J#$!!-!K%P$6L-!!`!!!*F!!3!!!!)!!!!
  10946. $!!!!!!!"!!!!!!G"8&"-!!!!!!!!"bSU+LS!!3!!!!!(CQpXC!!#!!!!!!GNDA0
  10947. V!!-!!!!"!!!!Km!!!8I!!!)R`!!%&m!!#!r!!"!(`!(J"m!#%!I!"!Jrq!J)(r!
  10948. 3%!rJ)#!(d%"3!iM`L!%%L33!!SB%!!'%!J!#3!)!"#!#!!J3!J!3#!3!)"3)!%!
  10949. N%!#!3L!"!%*!!J"#`!3!)b!)!"i3%!!!##!!!!4!!!!#J!!!!3!!!!#(`!!"am!
  10950. !!qI!!!Ih`!!2rm!!(rr!!Irr`!2rrm!(rrri$rrrm"rrrq!rrrr`Irrrq2rrrrc
  10951. rrrrqrrrrrrrrrrjrrrrm2rrrq"rrrr!2rrrJ(rrr`$rrri"rrrm!Irrq!(rrr!!
  10952. r2rJ!(Kr`!!!2i!!!"m!!!!1!!!!"!!!!!!)!!!!!!!!!!!$`!!rrr`!!!!!!!!!
  10953. !!!!2$`!2GAm!!!!!!!!!!!!!m!$`$eGI!!!!!!!!!!!!$`!!$`peI`!!!!!!!!!
  10954. !!2!!!!$r9em!!!!!!!!!!!m!!!!!$h9r!!!!!!!!$rr`!!!!!!pAA`!!!!!!!2$
  10955. -h`!!!!!2GAm!!!!!!!m!$-c`!!$rreGIrr!!!!$`!-c0m!!!$h9eGAm!!!!2!!c
  10956. -h`!!!!$h9eI`!!!!m!$-cI!!!!!!$h9r$`!!$`!-c0rI!!!!!!$hm!$`!2rrc-h
  10957. phI!!!!!!$`!!$`$qh2cIhFcI!!!!!!!!!!$`rFc2rGc!cp!!!!!!!!!-crc-$mh
  10958. -!-h`!!!!!!!!c2!2!-$-`!c0m!!!!!!!$-m!!2!-$!$!cI!!!!!!!-c`!!!2!-!
  10959. -$-h`!!!!!!c2!!!!!2!!`-cI`!!!!!$-m!!!!!rI$!c0r-!!!!!-c`!!!!$phm$
  10960. -hmc!!!!!c2!!!!!2hFcmcIc-!!!!$-m!!!!!$pc-r0r-`!!!!-c`!!!!!!r-`2h
  10961. rc!!!!!c2!!!!!!!!r!cr!2c!!!$-m!!!!!!!!!rrm!!2c!!-c`!!!!!!!!!!!!!
  10962. !!2c!c2!!!!!!!!!!!!!!!!!2c-m!!!!!!!!!!!!!!!!!!2c`!!!!!!!!!!!!!!!
  10963. !!!!2!!!!!!!!!!!!!!"!!,J"H!)i($JLrN4mc$Ub%D%#334L#*33Q#"d3!+!!3!
  10964. !Z!(i!rJIq$rqIrcrr[rrrrjrr(rirr$ri(I!!i!"!!!!!)!!!!!!m2r`!!!!!!m
  10965. 2pI!!!!!!m!$hm!!!$rm!!2A`!!$`c2$rprr`$`c2!!peI`$rc2m!!2I`m2hrh2!
  10966. !$`$2r2h!c`!!$2!2$!c2!!$2!!r`c2`!$2!!rFr2c!$2!!$m$rc!$2!!!!rr$m$
  10967. 2!!!!!!!!r2!!!!!!!!!2!!!!!!!!!2p6Bh*TF(3J3A"`E'PMBA4TEfi0$90PEQ4
  10968. c)'&ZHA4SD@jR)(P[G5"NFQp`)'pZ)'Pd)(4[)(4SC5"YB@PX)'&NC(*PFh-JFh"
  10969. PBfPQD@9N)'*j)(4SC5"`FQp`CA*dH5!LFQ9MDA"TC@jd)LiJ)&P[G5"YGA0d)'K
  10970. KGQ8JG'KP)&"bEfGbB@eYCA,9Fb"8EfpX)#KQG(!k,bpRB@9K,QYRFbjeDf&ZFbj
  10971. PC(8[BA"`E'9cBh*TF(3[Eh0KH'9Z,h"RE94[Ef`ZFfPd,QKaH#NJFf0bDA"dD@j
  10972. R)'9iG'9ZFfP[EL"TER0dB@aXC@3JG'mJGA0P)(4SDA-JFf0bDFN!!!!5!!)!!!!
  10973. !!!!!!!!"!!B!"K1*!!!!#PMJ!!-J!!!$)!!!!!!8!,3#+`-@!qd!E`(h!f-%A3!
  10974. !!!!!!!%!!!!MT`!!)UF!!!'Z!+d++"2@!!!!(!'Z!""16e4*!!!!LR0MFhS!!!#
  10975. @Ff0`G!!!!+*849K8!!%!VR0dH@`!!!$'Fh"cD!!!!0*$6d4&!!%!hN*14%`!!!$
  10976. fC("XG!!!!3*'8N9'!!-"$NP$6L-!!!%qD@0X0!!!!8TTBh-M!!!"9QPMFc3!!!&
  10977. LD'CNFJ!!!@j659T&!!!"HPG3Eh-!!!''!)$rre!!!!!!V44m!!$rr`!!!(`!V4(
  10978. F!)$rr`!!!*S!V4,J"'Mrr`!!'a)!V4&m%iRrr`!!)@J!V4Kd"'Mrr`!!(!-!V44
  10979. d!!$rr`!!("d!V45!!!$rrb!!(#-!V45N!!(rra3!($m!V45J!)$rr`!!(5m!V45
  10980. F!!$rr`!!(@F!V45B!)(rr`!!(@`!V458!),rr`!!(AF!V453!!#$rrm!!"f#!+d
  10981. 8M!#%rrm!!"f0!+d5[!#Arrm!!"fB!+d5d!#Arrm!!"kF!+d4a!#Arrm!!##J!+d
  10982. 5$!#Arrm!!#$N!+d3U1R!rrm!!#*V!+d5"2rrrrm!!#+"!+d3q!#!rrm!!#+2!+p
  10983. hM#3E:
  10984.  
  10985.  
  10986. --========================_17162796==_
  10987. Content-Type: text/plain; charset="us-ascii"
  10988. Content-Transfer-Encoding: quoted-printable
  10989.  
  10990. --
  10991. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  10992. The University of Western Australia      or 380 3860 Email for FAX Number
  10993. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  10994. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  10995.  
  10996.  
  10997.  
  10998. --========================_17162796==_--
  10999. =========================================================================
  11000. Date:         Wed, 27 Apr 1994 12:05:11 -0400
  11001. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11002. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11003. From:         Laurent Daudelin <laurent@PLANON.QC.CA>
  11004. Subject:      Applet & Droplet
  11005.  
  11006. Hi all!
  11007.  
  11008. I just begun to take a look at AppleScript and have a question.
  11009.  
  11010. I'm using AppleScript 1.0, found in the AV Macs.
  11011.  
  11012. I tried to use a script already posted here, to automatically do
  11013. binhex translation of a file, using Stuffit Lite.
  11014.  
  11015. The script check syntax is ok.  The problem is I don't have the
  11016. choice to save it as a drop-in application, in Script Editor.  I
  11017. opened some drop-in applet, and when I want to save them, the option
  11018. for a droplet appears in the dialog, but not when I want to save my
  11019. script.  Is there anything I'm missing here?  I suppose yes....
  11020.  
  11021. On a related topic, what do you get when you buy the AppleScript
  11022. user-version from APDA?  Any doc?  Is there any electronic
  11023. documentation about the basics of AppleScript?  I've search the
  11024. latest bookmark CD, but found nothing.
  11025.  
  11026. Any help very appreciated!
  11027.  
  11028. Laurent.
  11029.  
  11030. ---
  11031. ******************************************************************
  11032. Laurent Daudelin, Software Engineer
  11033. Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
  11034. laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
  11035. =========================================================================
  11036. Date:         Wed, 27 Apr 1994 12:35:38 -0400
  11037. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11038. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11039. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  11040. Subject:      Re: Applet & Droplet
  11041. In-Reply-To:  <no.id> from "Laurent Daudelin" at Apr 27, 94 12:05:11 pm
  11042.  
  11043. --Laurent Daudelin wrote:
  11044. >
  11045. >I'm using AppleScript 1.0, found in the AV Macs.
  11046.  
  11047.     You should definitely upgrade to 1.1.
  11048.  
  11049. >I tried to use a script already posted here, to automatically do
  11050. >binhex translation of a file, using Stuffit Lite.
  11051. >
  11052. >The script check syntax is ok.  The problem is I don't have the
  11053. >choice to save it as a drop-in application, in Script Editor.  I
  11054. >opened some drop-in applet, and when I want to save them, the option
  11055. >for a droplet appears in the dialog, but not when I want to save my
  11056. >script.  Is there anything I'm missing here?  I suppose yes....
  11057.  
  11058.     What you are missing is an "on open" handler for your script. Your
  11059. script should look something like:
  11060.  
  11061.         on open theFiles
  11062.            [This is where you have the script commands for the binhex
  11063.             translator, theFiles is a list that contains the pathnames
  11064.             to the files dropped onto the droplet.]
  11065.         end open
  11066.  
  11067. >On a related topic, what do you get when you buy the AppleScript
  11068. >user-version from APDA?  Any doc?  Is there any electronic
  11069. >documentation about the basics of AppleScript?  I've search the
  11070. >latest bookmark CD, but found nothing.
  11071.  
  11072.     If all you really want is some good documentation, then I recommend
  11073. buying the AppleScript Language Guide (English Dialect), from
  11074. Addison-Wesley. It will run you about $29.95 from your favorite
  11075. bookstore. Or you could buy the Complete AppleScript Handbook by Danny
  11076. Goodman. Also around $30, but it also comes with an upgrade to AS 1.1,
  11077. for the cost of the disk and shipping I believe.
  11078.  
  11079. -Hades
  11080. =========================================================================
  11081. Date:         Wed, 27 Apr 1994 12:36:33 -0400
  11082. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11083. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11084. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  11085. Subject:      Re: AS interpreter?
  11086. In-Reply-To:  <no.id> from "Neil Rest" at Apr 27, 94 07:33:51 am
  11087.  
  11088. --Neil Rest wrote:
  11089. >
  11090. >Lack of a command line has been one of the Mac's most awful cripplings
  11091. >all along.  It is 99 44/100% superior to DOS -- but cannot batch file!!
  11092.  
  11093.     I seriously hope this is a joke.
  11094.  
  11095. -Hades
  11096. =========================================================================
  11097. Date:         Wed, 27 Apr 1994 09:46:56 PDT
  11098. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11099. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11100. From:         "David Rogers,Eng" <david.rogers@ALDUS.COM>
  11101. Organization: Aldus Corporation, Seattle, WA
  11102. Subject:      Re: AS interpreter?
  11103.  
  11104. I don't agree.  There are times when a command-line is nice to have.
  11105. Otherwise there would be no MPW.
  11106.  
  11107. Regards,
  11108. David
  11109. ---------------------------------------------------------------------------
  11110. david.rogers@aldus.com    -========)--  Frodo Lives
  11111. --(========-
  11112. ---------------------------------------------------------------------------
  11113. _______________________________________________________________________________
  11114. From: Macintosh Scripting Systems on Wed, Apr 27, 1994 9:46 AM
  11115. Subject: Re: AS interpreter?
  11116. To: David Rogers,Eng
  11117.  
  11118. --Neil Rest wrote:
  11119. >
  11120. >Lack of a command line has been one of the Mac's most awful cripplings
  11121. >all along.  It is 99 44/100% superior to DOS -- but cannot batch file!!
  11122.  
  11123.     I seriously hope this is a joke.
  11124.  
  11125. -Hades
  11126. =========================================================================
  11127. Date:         Wed, 27 Apr 1994 13:04:23 -0400
  11128. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11129. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11130. From:         John Schettino <js12@GTE.COM>
  11131. Subject:      Re: Omitting a small list from a larger list
  11132.  
  11133. >Hi All,
  11134. >
  11135. >This works, but I'm having trouble inserting another repeat loop and still
  11136. >only going through the 'big' list once:
  11137. >
  11138. >Thx in advance for your help.
  11139. >BobT
  11140.  
  11141. You were *SO* close, but it is simple (NOTE! May Only Work in AS 1.1)
  11142.  
  11143. set userVolume to "Admission.Users:"
  11144. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  11145.                      "Admission.Users:SUPLOAD"}
  11146. tell finderLib
  11147.         repeat with currentFolder in (listFiles at userVolume)
  11148.                 set allInfo to info for alias currentFolder
  11149.                 set isFolder to allInfo's folder
  11150.                 set isLocked to allInfo's locked
  11151.                 if noCopyList does not contain currentFolder  then
  11152.                                         if isFolder and not isLocked then
  11153.                                                 ** DO SOMETHING HERE **
  11154. (copyFiles, beep, whatever)
  11155.                                         end if
  11156.                 end if
  11157.         end repeat
  11158. end tell
  11159.  
  11160.  
  11161. Note that if statement!
  11162. In AS (1.1?) you can ask if a list (noCopyList) contains an element
  11163. (currentFolder)
  11164.  
  11165. Just try this code snippit, If you get true as the result, then it works in 1.0
  11166.  
  11167. set noCopyList to {"Admission.Users:DELETED.SAV", "Admission.Users:RTERRA",
  11168. "Admission.Users:SUPLOAD"}
  11169.  
  11170. noCopyList contains "Admission.Users:DELETED.SAV"
  11171.  
  11172. - john
  11173.  
  11174. -----------------------------------------
  11175. js12@gte.com             GTE Laboratories
  11176. John Schettino                Waltham, MA
  11177. =========================================================================
  11178. Date:         Wed, 27 Apr 1994 10:10:32 -0700
  11179. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11180. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11181. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  11182. Subject:      Re: Applet & Droplet
  11183.  
  11184. >Hi all!
  11185. >
  11186. >I just begun to take a look at AppleScript and have a question.
  11187. >
  11188. >I'm using AppleScript 1.0, found in the AV Macs.
  11189.  
  11190. Version 1.1 of AppleScript fixes some problems with 1.0.  You might want to
  11191. purchase an upgrade.  You might want to wait, if you're not having
  11192. problems, for the "spring" release (now due in summer, 'tis said) of System
  11193. 7.5.
  11194.  
  11195.  
  11196. >I tried to use a script already posted here, to automatically do
  11197. >binhex translation of a file, using Stuffit Lite.
  11198. >
  11199. >The script check syntax is ok.  The problem is I don't have the
  11200. >choice to save it as a drop-in application, in Script Editor.  I
  11201. >opened some drop-in applet, and when I want to save them, the option
  11202. >for a droplet appears in the dialog, but not when I want to save my
  11203. >script.  Is there anything I'm missing here?  I suppose yes....
  11204.  
  11205. To be a droplet, a script requires a handler for the open message.  That
  11206. handler receives control when a file is dropped onto the droplet.  Check
  11207. out one of the example droplets for details.
  11208.  
  11209.  
  11210. >On a related topic, what do you get when you buy the AppleScript
  11211. >user-version from APDA?  Any doc?  Is there any electronic
  11212. >documentation about the basics of AppleScript?  I've search the
  11213. >latest bookmark CD, but found nothing.
  11214.  
  11215. The documentation does come with the purchased version...it is also
  11216. available in bookstores.  That should be true there in Quebec, as it is
  11217. here.
  11218.  
  11219. --John
  11220.  
  11221. --
  11222. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  11223. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  11224. =========================================================================
  11225. Date:         Wed, 27 Apr 1994 12:31:24 -0500
  11226. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11227. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11228. From:         Fred Terry <pfterry@LKS.CSI.COM>
  11229. Subject:      Re: AS interpreter?
  11230. In-Reply-To:  Your message of "Wed, 27 Apr 94 09:46:56 PDT"
  11231.  
  11232. David,
  11233.  
  11234. >I don't agree.  There are times when a command-line is nice to have.
  11235. >Otherwise there would be no MPW.
  11236. >
  11237.  
  11238. I have to agree with you. One of my favorite features in Frontier is the
  11239. Instant or Quick Script window....I just want it available no matter what
  11240. program I'm in. But then, maybe I've been spending too much time on
  11241. workstations. :-)
  11242.  
  11243. pf
  11244.  
  11245.  
  11246. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  11247. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  11248. =========================================================================
  11249. Date:         Wed, 27 Apr 1994 14:14:58 -0400
  11250. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11251. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11252. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  11253. Subject:      Re: What Apps are running
  11254.  
  11255. > Can anyone tell me a method for determining what applications are
  11256. > running? I need to close all apps before running a reset script I've
  11257. > written.
  11258. >
  11259. > Any help would be appreciated.
  11260.  
  11261. the "list applications" osax from the GTQ programming suite should work fine.
  11262. GTQ is on gaea in applescript/osaxen, or i can email it if you need.
  11263.  
  11264. --
  11265. My opinions are mine only and tentative, pending further data
  11266.                         Matthew Ahrens
  11267. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  11268. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  11269. =========================================================================
  11270. Date:         Wed, 27 Apr 1994 14:22:20 -0400
  11271. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11272. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11273. From:         Matthew Ahrens <ai158@FREENET.BUFFALO.EDU>
  11274. Subject:      Re: Menu Events
  11275.  
  11276. I'm not sure if this is what you were talking about, but I wrote a
  11277. script to be able to easier use Menu Events. Normally, you are supposed
  11278. to use ResEdit to paste the aete into the app you wish to control. i
  11279. don't know about you, but to me this is a pain in the butt. insted, just
  11280. paste this script at the bottom of the script you are writing, and call
  11281. it as follows:
  11282.  
  11283. to query a menu list, use
  11284. QueryMenuList(application <app name>)
  11285. and it will return the info. To query a menu, use
  11286. QueryMenu(application <app name>, menu id)
  11287. to do a menu item, use
  11288. DoMenuItem(application <app name>, Menu ID, Menu Item ID)
  11289.  
  11290. ps. i just posted a much improved version of this script to info-mac, so
  11291. it should show up soon. get it from there if you can't get this version
  11292. to work. the better version lets you do a menu by giving the subroutine
  11293. the name of the app, menu title, and menu item, and lots better error
  11294. handling.
  11295.  
  11296. ***attached script follows***
  11297.  
  11298. on QueryMenuList(apl)
  11299.   try
  11300.     tell apl
  11301.       return (<<event MAEnuqmn#>>)
  11302.       -- in the above line, the "MAEnuqmn#" should have "AE" as one character
  11303.     end tell
  11304.   on error (errID)
  11305.     return (errID as string)
  11306.   end try
  11307. end QueryMenuList
  11308.  
  11309. on QueryMenu(apl, MenuID)
  11310.   try
  11311.     tell apl
  11312.       return (<<event MAEnuqmn >> given <<class mnid>>:MenuID)
  11313.       -- in the above line, the "MAEnuqmn " should have "AE" as one character
  11314.     end tell
  11315.   on error (errID)
  11316.     return (errID as string)
  11317.   end try
  11318. end QueryMenu
  11319.  
  11320. on DoMenuItem(apl, MenuID, MenuItemID)
  11321.   try
  11322.     tell apl
  11323.       <<event MAEnusemi>> given <<class mnid>>:MenuID, <<class miid>>
  11324. :MenuItemID
  11325.       -- in the above line, the "MAEnusemi" should have "AE" as one character
  11326.     end tell
  11327.     return ""
  11328.   on error (errID)
  11329.     return (errID as string)
  11330.   end try
  11331. end DoMenuItem
  11332.  
  11333. --
  11334. My opinions are mine only and tentative, pending further data
  11335.                         Matthew Ahrens
  11336. ai261@FreeNet.Carleton.ca           ai158@FreeNet.Buffalo.edu
  11337. MacRules2@aol.com     <-Last Resorts->     Matthew210@aol.com
  11338. =========================================================================
  11339. Date:         Wed, 27 Apr 1994 14:40:21 -0400
  11340. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11341. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11342. From:         Aaron Mansheim <mansheim@CSUGRAD.CS.VT.EDU>
  11343. Subject:      AS interpreter
  11344.  
  11345. Sorry, I didn't mean to start a thread on the merits of Mac OS.
  11346. But since I did, here's my take :)  I think AppleScript supplies
  11347. batch processing perfectly well. It's just 1) not interactive the
  11348. way an interpreter is and 2) not directly useable for controlling a
  11349. Mac remotely via something less graphical. Presumably "most users"
  11350. don't care about these features, as it's much easier to use the
  11351. graphical interface.
  11352.         Now that I've installed ScriptDaemon, I'm enjoying the chance
  11353. to use the AppleScript I've learned as if using an interpreter. This
  11354. way I don't feel the need to sit down and try to write a complete
  11355. package for some purpose the way I do when using the Script Editor.
  11356. The ScriptDaemon prompt stares at me just as hard as an empty Script
  11357. Editor window, but ScriptDaemon only wants one command to be happy :)
  11358. On the other hand, pretty soon I'll want to create something to allow
  11359. me to keep a current path and change directory from it. Using "list
  11360. folder" with full pathnames all the time gets old.
  11361.         I don't think I'll be using ScriptDaemon remotely until I've
  11362. learned the file IO commands from Script Tools. Shouldn't be too hard.
  11363. My next thing to look for is a way to access dictionaries from a
  11364. script.
  11365.         Thanks to those who suggested ScriptDaemon and to Peter Lewis,
  11366. who seems to be very busy.
  11367. =========================================================================
  11368. Date:         Wed, 27 Apr 1994 12:09:22 U
  11369. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11370. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11371. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  11372. Subject:      Getting the FM Field Index
  11373.  
  11374. Getting the FM Field Index in AS
  11375.  
  11376. I'm trying to optimize a script by doing only searches for items that are
  11377. actually in a database.  Now, FM can easily (and very quickly) give me a list
  11378. of values in a field by giving me the index of that field (Edit, Paste
  11379. Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  11380. =========================================================================
  11381. Date:         Wed, 27 Apr 1994 15:24:15 EST
  11382. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11383. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11384. Comments:     Resent-From: David Avery <DAVID@DARTCMS1>
  11385. Comments:     Originally-From: sheaj@ohsu.edu (Jackson Shea,PC,Microbiology)
  11386. From:         David Avery <DAVID@DARTCMS1.BITNET>
  11387. Subject:      Re: AS interpreter?
  11388. In-Reply-To:  your message  of Wed Apr 27 12:31:24 -0500 1994
  11389.  
  11390. I don't know if anyone has mentioned it but there is a product calle CLImate
  11391. for the macintosh which provides dos/unix flavored commands for file
  11392. manipulation.
  11393.  
  11394. There is a review of it in MacWeek (7/26/93 with rebuttal by the company in
  11395. 9/6/93).
  11396.  
  11397. Pertinent info:
  11398. CLImate
  11399. Orchard Software Inc.
  11400. P.O. Box 380814
  11401. Cambridge, MA  02238-0814
  11402. (617) 876-4608
  11403. SRP: $59.95
  11404.  
  11405. Jackson Shea
  11406.  
  11407. ---------------------------------
  11408. Oregon Health Sciences University                  Voice:  (503)494-2444
  11409. Molecular Microbiology & Immunology                  Fax:  (503)494-6862
  11410. Mail Code L220                                      inet:  sheaj@ohsu.edu
  11411. Portland, Oregon  97201-3098   USA                    or   jshea@lclark.edu
  11412. =========================================================================
  11413. Date:         Wed, 27 Apr 1994 15:04:41 -0500
  11414. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11415. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11416. From:         hunt andrew n <andy@UX1.CSO.UIUC.EDU>
  11417. Subject:      Eudora send mail script
  11418. In-Reply-To:  <199404271938.AA27001@ux1.cso.uiuc.edu> from "David Rogers,
  11419.               Eng" at Apr 27, 94 09:46:42 am
  11420.  
  11421. I just tried out the recently posted Eudora script and have
  11422. a question about it.
  11423.  
  11424. When I try and use it (drag/drop and double click) I get
  11425. the error message "Could not run the Script "Mail to Peter
  11426. because the script's data format is too new for scripting
  11427. component to read it"
  11428.  
  11429. Does this mean that I need a newer version of Applescript?
  11430. I have version 1.0 of AppleScript and also v 1.0.1 of the Script Editor.
  11431. Both came with the Tao of Applescript book. Is there an update?
  11432.  
  11433. Thanks!
  11434.  
  11435.  
  11436. ah.
  11437.  
  11438. Andrew Hunt
  11439. Book Designer @ University of Illinois Press
  11440. a-hunt2@uiuc.edu
  11441. =========================================================================
  11442. Date:         Wed, 27 Apr 1994 17:01:04 -0600
  11443. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11444. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11445. From:         Mel Walker <mwalker@NETCOM.COM>
  11446. Subject:      Re: Mail document to person as Eudora Attachment
  11447.  
  11448. >--========================_17162796==_
  11449. >Content-Type: text/plain; charset="macintosh"
  11450. >Content-Transfer-Encoding: quoted-printable
  11451. >
  11452. >The attached file is an applet that takes any file droped onto it and mails
  11453. >it off to the person specified in the file.  I would change it to a bogus
  11454. >email address as the default, except something seems to have happened to my
  11455. >Applescript installation and I'm not entirely sure that modifying the one
  11456. >that Quinn sent to me would be a good plan.
  11457. >
  11458. >The applet has been sent to Steve Dorner for inclusion in the scripts
  11459. >directory on ftp.qualcomm.com.
  11460. >
  11461. >The applet is most likely public domain.  To Quote Quinn and Peter from the
  11462. >comments "As far as we=D5re concerned you can do whatever you like with this
  11463. >script."
  11464. >
  11465. >Please look at this file and modify it before testing it out.  Peter
  11466. >doesn't want your attachments!
  11467. >
  11468. >Share and Enjoy,
  11469. >Craig
  11470.  
  11471. Why didn't you write the script like so:
  11472.  
  11473. property recipient: "user@machine.com"
  11474. on open theFiles
  11475.         tell application "Eudora"
  11476.                 make message InsertHere end of mailbox "out" of mail folder ""
  11477.                 set field "to" of message 0 to recipient
  11478.                 set field "subject" of message 0 to "File Transfer"
  11479.                 attach message 0 DocumentList theFiles -- note change
  11480.                 queue message 0
  11481.         end tell
  11482. end open
  11483.  
  11484. instead of doing all that work to make the X-Attachments line as you did?
  11485.  
  11486. --Mel Walker
  11487.  
  11488. --
  11489. Mel Walker                                           mwalker@netcom.com
  11490. "Actually, I just like to say the word 'Smock.' Smock Smock Smock Smock
  11491. Smock Smock Smock!" - Hobbes
  11492. =========================================================================
  11493. Date:         Wed, 27 Apr 1994 23:37:15 -0400
  11494. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11495. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11496. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  11497. Subject:      parsing text in AppleScripts
  11498.  
  11499. Greetings to macscrpt readers ...
  11500.  
  11501. I have a question that doesn't appear to be addressed in the FAQ or
  11502. Tao of AppleScript.  It's fairly clear from the language description
  11503. that AS is not intended to be a text-parsing language, but I'd like
  11504. to find some basic string manipulation beyond that offered in the
  11505. String Commands osax that comes with AppleScript.  The only thing
  11506. I've found that comes close were some of the Rinaldi externals
  11507. in the XCMD osax package, but the functionality is not exactly
  11508. what I'm looking for.
  11509.  
  11510. Specifically, I'd like something that would let me manipulate
  11511. strings as in HyperCard -- for example:
  11512.  
  11513.  get char (offset "[" of str) to (offset "]" of str) of str
  11514.  
  11515. which would mimic the HyperTalk
  11516.  
  11517.  get char (offset("[",str)) to (offset("]",str)) of str
  11518.  
  11519. which returns "[text]", say, if str is "Some [text] here".
  11520.  
  11521. Assuming that such string-parsing tools are not available as
  11522. osaxen, would it be a good approach to create Xthings with
  11523. ThinkC or CompileIt, and add it to the XCMD osax, or is it
  11524. easier to write osaxen directly with Think C?
  11525.  
  11526. I'm aware that some of what I'd like to do might be doable
  11527. using the scriptable text parsing of a MacPerl, but launching
  11528. that is overkill for the current project, in which I'd like
  11529. to parse the result of "current date" to build a string like
  11530. "940427" to append to the name of a backup file.
  11531.  
  11532. Suggestions and pointers to books, FAQs, or ftp sites
  11533. gratefully accepted!
  11534.  
  11535. Bill
  11536.  
  11537. -- Bill Johnston (johnston@me.udel.edu)
  11538. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  11539. =========================================================================
  11540. Date:         Wed, 27 Apr 1994 21:05:21 U
  11541. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11542. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11543. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  11544. Subject:      Re: parsing text in AppleScr
  11545.  
  11546. Reply to:   RE>parsing text in AppleScript
  11547. Bill Johnston says:
  11548. >Specifically, I'd like something that would let me manipulate
  11549. >strings as in HyperCard -- for example:
  11550. > get char (offset "[" of str) to (offset "]" of str) of str
  11551.  
  11552. You mean something like,
  11553. set str to "just some text with [a string] in brackets"
  11554. set astring to (characters ((offset of "[" in str) + 1) thru ((offset of "]"
  11555. in str) - 1) of str) as text
  11556.  
  11557. ?
  11558. Works for me ...
  11559.  
  11560. -roy, wondering if anybody's got some Excel-related scripts I could take a
  11561. look at?
  11562. =========================================================================
  11563. Date:         Wed, 27 Apr 1994 22:43:22 -0700
  11564. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11565. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11566. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  11567. Subject:      Re: parsing text in AppleScripts
  11568.  
  11569. >Specifically, I'd like something that would let me manipulate
  11570. >strings as in HyperCard -- for example:
  11571. >
  11572. > get char (offset "[" of str) to (offset "]" of str) of str
  11573.  
  11574. Not what you want, but in Frontier's UserTalk, that would be simple:
  11575.  
  11576.    str1 =3D string.nthField (str, ']', 1)
  11577.    str1 =3D string.nthField (str1, '[', 2)
  11578.  
  11579. [The first line makes string 1 everything before the first ']'...the second
  11580. makes str1 everything after the first '['.  If you don't need the original
  11581. str, you can just store back into that, rather than using str1.  I'm too
  11582. lazy to figure out whether the HyperTalk includes the [ and ] or not...the
  11583. UserTalk doesn't but they could easily be added back, by changing the
  11584. second line to
  11585.  
  11586.    str1 =3D "[" + string.nthField (str1, '[', 2) + "]"
  11587.  
  11588.  
  11589. >Assuming that such string-parsing tools are not available as
  11590. >osaxen, would it be a good approach to create Xthings with
  11591. >ThinkC or CompileIt, and add it to the XCMD osax, or is it
  11592. >easier to write osaxen directly with Think C?
  11593.  
  11594. Unless you are very comfortable already writing XCMDs (or want an XCMD for
  11595. your HyperCard work, too), just write the osax directly.  osaxen are easy.
  11596.  
  11597. >I'm aware that some of what I'd like to do might be doable
  11598. >using the scriptable text parsing of a MacPerl, but launching
  11599. >that is overkill for the current project, in which I'd like
  11600. >to parse the result of "current date" to build a string like
  11601. >"940427" to append to the name of a backup file.
  11602.  
  11603. This snippet requires AppleScript 1.1 (so does sanity), and I sincerely
  11604. hope that there is a way to get the numeric month, rather than the
  11605. enumerated type as found below.  The following should be fine in other
  11606. languages, too.  It does produce a nice numeric string representing the
  11607. date:
  11608.  
  11609. set foo to current date
  11610. set yr to characters 3 through 4 of ((year of foo) as string) as string
  11611. set mo to (month of foo)
  11612. set da to (day of foo) as string
  11613. if (count of (da as string)) < 2 then set da to "0" & da
  11614. if mo =3D January then
  11615.         set mo to "01"
  11616. else if mo =3D February then
  11617.         set mo to "02"
  11618. else if mo =3D March then
  11619.         set mo to "03"
  11620. else if mo =3D April then
  11621.         set mo to "04"
  11622. else if mo =3D May then
  11623.         set mo to "05"
  11624. else if mo =3D June then
  11625.         set mo to "06"
  11626. else if mo =3D July then
  11627.         set mo to "07"
  11628. else if mo =3D August then
  11629.         set mo to "08"
  11630. else if mo =3D September then
  11631.         set mo to "09"
  11632. else if mo =3D October then
  11633.         set mo to "10"
  11634. else if mo =3D November then
  11635.         set mo to "11"
  11636. else
  11637.         set mo to "12"
  11638. end if
  11639. return yr & mo & da
  11640.  
  11641. (It's fine in French, apparently (gotten just by changing the dialect in
  11642. the preferences)):
  11643.  
  11644. mets foo =E0 date courante
  11645. mets yr =E0 chaque caract=E8re depuis 3 jusqu'=E0 4 de ((ann=E9e de foo) com=
  11646. me
  11647. cha=EEne) comme cha=EEne
  11648. mets mo =E0 (mois de foo)
  11649. mets da =E0 (jour de foo) comme cha=EEne
  11650. si (compte de (da comme cha=EEne)) < 2 alors mets da =E0 "0" & da
  11651. si mo =3D Janvier alors
  11652.         mets mo =E0 "01"
  11653. sinon si mo =3D F=E9vrier alors
  11654.         mets mo =E0 "02"
  11655. ...
  11656. sinon si mo =3D Novembre alors
  11657.         mets mo =E0 "11"
  11658. sinon
  11659.         mets mo =E0 "12"
  11660. fin si
  11661. renvoie yr & mo & da
  11662.  
  11663. [Eudora will use a quoted form for the French a` (to)...what your mail
  11664. reader will do with it I don't know...likewise the other accented
  11665. characters.]
  11666.  
  11667. --
  11668. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  11669. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  11670. =========================================================================
  11671. Date:         Wed, 27 Apr 1994 11:27:30 -0500
  11672. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11673. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  11674. From:         QMGATE <QMGATE.INET@QMGATE.LARC.NASA.GOV>
  11675. Subject:      QM Server Problems - Please
  11676.  
  11677. Mail*Link(r) SMTP               Mail document to person as Eudora
  11678. See enclosed file of Mail To Peter
  11679.  
  11680.  
  11681.  
  11682. (This file must be converted with BinHex 4.0)
  11683.  
  11684. :$8eKD@`J9'mJ8'9dCA)!39"36'4`E(3!!!!!!!!!!#99p3)!!!!!!3!!!#1R!!!
  11685.  
  11686. LT`!!!Dk,!!!!!!!"rrm8!"ZR!+QPp!#!rrm!!"bA!!!!!!!!r`e0B@PX)&4[)&"
  11687.  
  11688. PG'9b!J!!!%&38%aNF'ad!!!!!!!!!!""8&"-C("XG!!!!!!!!!!!!!!!!!!!!!!
  11689.  
  11690. !!!!!!!!!!+RP(&8!!!!!!!!P93!!!!#Arrm!!#!)!+QTd!#Arrm!!#"-!!!!!1R
  11691.  
  11692. !rrm!!#(6!!!!!2rrrrm!!#(T!!!!!!#!rrm!!#(h!!!!!2G58p*MrCZQF"'L%aF
  11693.  
  11694. ij*KQ6Q3MMY-U-MQIqSI#*k-c$2F&hFe*4&RI#85B`V&)Vfc!9'XUmdMHF#`MQ38
  11695.  
  11696. *jj`M#D`!!!"i!!!!!!!)!!!!!!!!!!!!!!!!!!$rrrrr!!!!0!!!!#3!!!!!)'m
  11697.  
  11698. !"+"I)'m!"+%SS#01G808Eb"bG@iJG'KTFb"cBh*TF(3JBA"`E'PMBA4TEfiX)(P
  11699.  
  11700. [G5"YGA0d)'CTFR0d)'PZFh4KE'`J3A"`E'96Bh*TF(3Z!!!!'N!!!!!!!!!!!!!
  11701.  
  11702. !!!!!!!!!!!!!!!!!!!!!!!!DG%CKFf4939-J-5ia-$%Z-6!1!!!!"!rrr`!"!!)
  11703.  
  11704. !!`(rr`!!$3!"!!&V!!!!!!!!!!3#!!3!!J!&!!B0!!8!!Q`!!3!!!!$rrJ!(!Ir
  11705.  
  11706. q!!!-!!F!&`!4)%eKD@`J9'mJ8'9dCA)J+$S!!J!!!J!'!!)!#!!*$3!)!!*X!!%
  11707.  
  11708. !!!!!rrd!#J(rr3!!$!!+!#`!*L#T)&"PG'9b)%aPGfPc)'&ZC#"4G@PZEL$59'K
  11709.  
  11710. P)%9cDfPYEb(6!!)!!!)!#3!#!!X!$!d!#`!#E!!"!!!!!2rm!!d"rr`!!!`!$3!
  11711.  
  11712. 5!!`J-MFJ3A"b)$%j163!!J!!!J!-!!)!$J!2$3!1!!*X!!%!!!!!rrX!%!(rq`!
  11713.  
  11714. !$!!3!%m!55""Fb"QBA)JBA-JGfA9FQ8JBfpZBf9bEQ9N)(P[G5"MB@iJC'mJGfK
  11715.  
  11716. KG'9fCA)JH@pe)'aTDf8JGfPdD#"dD'Pc)(0MFQP`G#i!!J!!!J!2!!)!%3!5$3!
  11717.  
  11718. 4!!*X!!%!!!!!rrS!%`(rqJ!!$!!6!$i!1#"#BA0PC#"[EL"dD'8J8Q9aG@9cG#"
  11719.  
  11720. &G@4[FQ%J5@jQEb"cBh*TF(3JBRNJ8h4PGQ8J4'pbEQ9b!!)!!!)!%J!#!"3!&3d
  11721.  
  11722. !&!!#E!!"!!!!!2rjrrJ"rrN!!!(rq!!!!J!9!!)!&J!A$3!@!!*X!!%!!!!!rrI
  11723.  
  11724. rpJ(rp`!!!Irf!!!#!"F!!J!B!"N0!"J!!Q`!!3!!!!$rp3!D!Ire!!!-!"S!2J!
  11725.  
  11726. i)&4SC5"dFQPMDhNJF'&bG#"dEb"dD'Pc)(0MFQP`G#"hBA-JG'KP)(GPDA*N)(0
  11727.  
  11728. jER4KH#"QEh)!!J!!!J!C!!)!'`!F$3!E!!*X!!%!!!!!rr3!(3(rp!!!$!!G!%N
  11729.  
  11730. !3b"MFQ9KG'PZCb"K)'jPGb"YCA0cB@GP,L!J9'KTFb"hD@aX)'9fC@jdG@&XE(N
  11731.  
  11732. JBQ8JCQPiC@3JD@iJ4A9NEh*K*h-!!J!!!J!F!!)!(J!I$3!H!!*X!!%!!!!!rr-
  11733.  
  11734. !)!(rm`!!$!!J!"i!'#""F("XC90MFQP`G#"ND@0dD@pZBA*j,J!#!!!#!"m!!J!
  11735.  
  11736. K!#)0!#%!!Q`!!3!!!!$rm[ra!Irb!!!"rr%!!!)!)J!#!#-!*!d!)`!#E!!"!!!
  11737.  
  11738. !!2r`!#8"rr!!!!`!*3"(!%%J5@e`Eh*dB@jd)(4TF$SJ)#*0CA0cB@GP)$!L)'P
  11739.  
  11740. c)(0SEh*dD'&ZC#"QEh)JG'KP)'0eFR*PER3JE@9cFf&RC3!#!!!#!#3!!J!Q!#F
  11741.  
  11742. 0!#B!!Q`!!3!!!!$rlrrZ!Ir[!!!"rqi!!!)!*`!#!#J!+3d!+!!#E!!"!!!!!2r
  11743.  
  11744. Y!#S"rqd!!!`!+J"'!%!J9'KP)(4bD@0VH5"`BA*d)'pQ)(4SDA-JFf0bDA"d)#T
  11745.  
  11746. ZEhFU)'Pc)(4SC5"PGQPX)'&`F'aTBf&dD@pZ)'pQ!!)!!!)!+3!#!#X!,!d!+`!
  11747.  
  11748. #E!!"!!!!!2rX!#d"rq`!!!`!,3!h!$%JBf&cG#"dEb"PH(4bB@0d)(4SC5"3BA*
  11749.  
  11750. *4#"QFQpY)'&Z)%C68h"PBbiJ)&9bCfJK!!)!!!)!,!!#!#i!,`d!,J!#E!!#!!!
  11751.  
  11752. !!2rVrqS"rqX!!!(rkJ!!!J![!!)!-!!a$3!`!!*U!!!!!!!#rqN!-J[rk3!0-!!
  11753.  
  11754. *FQ9MDA"TC@jd!!!0!$)!!@d!!!!!!!%!-``!-`!N!"j`CA4PFLjXCAGTFd"TEQC
  11755.  
  11756. [,Q0eFR4TELjPC(8ZBA8!!J!!!J!a!!)!0!!e$3!d!!*X!!)!!!!!rqMrj`(rk!!
  11757.  
  11758. !!IrR!!!#!$8!!J!f!$F0!$B!!QN!!!!$!!B!1!!j$3!i!!0*!!)!!!!!rqB!1[r
  11759.  
  11760. P#[rQ!"JZB@9fG'pNEf0ZG@aX!!#!!!!!%!"KE'Pc$3!k!!&[!!!!!!!!rq3,rq3
  11761.  
  11762. !$6!!#@CTE'9IE'PcG!!!![rP!!!0!$N!!@X!!!!!!#d!1`)!1`!#!$`!23d!2!!
  11763.  
  11764. #E!!"!!!!!2rM!$i"rq-!!!`!2J",!%8JFQ9MC@PfC5"dD'8JC(*[F("PC#"QD@a
  11765.  
  11766. PFb"KEQ3JBR9TE'3JB@iJBA"`FQp`FQPKG'8JBA4dB@0SE@9ZG#"cG(*TEQF!!J!
  11767.  
  11768. !!J!p!!)!2`"!$3!r!!*c!!!!!!!%!%%!3Jd!33!"E3!!!!!!!3"$$!"$!!B!!!!
  11769.  
  11770. #!!!0!%)!!@m!!!!!!!$riJ[riJ!2-!!,BA4dB@0SE@9ZG(-!!!)!3!!#!%3!43d
  11771.  
  11772. !4!!$@!!!!!8!*J"'rq%!4`d!4J!#FJ!!!"8!)3")!%N0!%J!!Q)!!!!9!"m!5J"
  11773.  
  11774. ,$3"+!!*L!!!!&3!G!%`!63d!6!!"E`!!!"8!&[rJ#rrJ!!m`!!YKG(4KBfKYC@j
  11775.  
  11776. dF`!!$3"0!!0*!!!!&J!Frpm!6[rH#rrI!#!`!!jKE'PKFh4[E@pZFh4PFJ!1B@a
  11777.  
  11778. TBA08Ede[ER0dCA)#!%i!!J"2rpd0!%m!!@m!!!!A!"Mrh![rh!!&-!!"D3!!![r
  11779.  
  11780. G!!!#rpi!!!d!5`!"E3!!!"d!(J"3$!"3!!F!!5!!!J!!$3"*!!&[!!!!!!!!rpX
  11781.  
  11782. ,rpX!$c!!#f&dG'&MD'ePER4c!!!,rq%!"6!!!@N!!!d!4`!"E`!!!!J!#IrD#rr
  11783.  
  11784. D!!d`!!PQD@aPAfaTFh3!!!)!43!#!&(rf3d!83!$53!!!#F!,IrB!&,re`[rf!!
  11785.  
  11786. 3-!!'C'pcC@jN!!CNEe0PEQ3#!&)!!J"6rpB0!&-!!@m!!!!S!#Rre3[re3!2-!!
  11787.  
  11788. ,BA4dB@0SE@9ZG(-!!!,reJ!!![rA!!!#rpN!!!)!0`!#!&3!93d!9!!#E!!#!!!
  11789.  
  11790. !!2r8rp-"rp3!!!(rd`!!!J"9!!)!9J"A$3"@!!*T!!!!"`!+!&J!@3d!@!!$53!
  11791.  
  11792. !!!!!!2r5!&Vrd3[rdJ!J-!!1B@aTBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9
  11793.  
  11794. b!J"D!!)!@rr3$3"E!!&[!!!!!!!!rmm,rmm!$6!!#A4SC9pKE'PKF`!!![r3!!!
  11795.  
  11796. #rp%!!!d!@3!"D`!!!!!!4!"F!J"F!!)!A3"H$3"G!!*X!!%!!!!!rmi!A`(rcJ!
  11797.  
  11798. !$!"I!%i!5#"MEfjfCA*d)'&Z)'&XD@&c)(4[)(4SC5"QEh*YBA3JFQ9aG@PbC@3
  11799.  
  11800. JBRNJ4A9NEh*KeA-J@#e"G(4KBfKYC@jd)'CTC@aN,J!#!!!#!&i!!J"J!'%0!'!
  11801.  
  11802. !!R)!!!!!!!m!BJ"M$3"L!!0*!!)!!!!0rmd!C!"P#[r0!"JZFhPcEd0"8e3U+LS
  11803.  
  11804. U!!!!!!!!!!!U+LSU$3"N!!*X!!8!!!!$!'Erc!d!CJ!#B`!!!!!!!`"R!'J0!'F
  11805.  
  11806. !!@m!!!!!!!(rb`[rb`!0-!!*G'KPAf&XD@&c!!!0!'J!!@d!!!!"!!,rbJVrbJ!
  11807.  
  11808. %#QCcFb!"rm`!!!B!C3!$rmN!D3"U#[r*!!3+4P*263d!D3!"E3!!!!3!"Ir)!rr
  11809.  
  11810. )!!-'!'S!!rr(!'X!E!Vra`!%#P0*@N80!'X!!@d!!!!'!!IraJ2raJ!%"J"X!!2
  11811.  
  11812. ra3"Yrm3+rm8!"!T86b!J$3"Y!!&Y!!!!#!!*!'i-!'i!#J!%E'pZC`!#!!!'rm3
  11813.  
  11814. !!!d!B`!"E`!!!!!!!2r$#rr$!!i`!!9`BA*TC!!&F'&b583#!'%!!J"[!(!0!'m
  11815.  
  11816. !!R)!!!!3!"F!F3"b$3"a!!&+!!!!%!!6!(-#!(-!!J"drm)0!(3!!@d!!!!3!"%
  11817.  
  11818. !G3`!G3!(!!%k!!)!!!,r`J!!$3"b!!*Z!!-!!!!!!(B!G`d!GJ!"-3!!!"3!&[r
  11819.  
  11820. "#[r"!!3+G(KNE!d!G`!"-3!!!"-!&2r!#[r!!!3+BA0MFJ)!F!!#!(J!H3d!H!!
  11821.  
  11822. #FJ!!!"J!)!"k!(X0!(S!!Qi!!!!B!"i!I!"p$3"m!!)d!!!!'`!Hrlm!IJVr[`!
  11823.  
  11824. %#Q0TG'd0!(i!!@d!!!!F!"hr[J2r[J!"$3"p!!*X!!8!'!!E!(rr[3d!I`!#B`!
  11825.  
  11826. !!"J!'`#!!)%0!)!!!@m!!!!B!"Rr[![r[!!0-!!*G'KPAf&XD@&c!!!0!)%!!@d
  11827.  
  11828. !!!!C!"VrZ`VrZ`!%#P4&@&3"rld!!!d!H`!"E`!!!!!!!2qk#rqk!!X`!!GfEfa
  11829.  
  11830. ZB@eP!!!#!(N!!J##!)-0!))!!R)!!!!K!#N!K!#&$3#%!!*Z!!!!)3!R!)B!K`d
  11831.  
  11832. !KJ!#0!!!!#3!*rqj!)J+rlN!"!TMDA4Y$3#)!!&Y!!!!*3!QrlJ$rlMrr`d!K`!
  11833.  
  11834. #E!!&!#%!*!#*rlF0!)N!!Q-!!!!K!#3!LJ#,$3#+!!&[!!!!)3!LrlB,rlB!$6!
  11835.  
  11836. !#A4SC9pKE'PKF`!!$3#,!!&Y!!!!)J!Mrl8+rl8!"!T849K8!Iqh!!!0!)8!!@m
  11837.  
  11838. !!!!!!!$rY![rY!!*-!!&CQjKE@8!!!)!J`!#!)`!M3d!M!!#FJ!!!#S!-3#1!)m
  11839.  
  11840. 0!)i!!8S!!!!U!#d!N!!#!*!!!!)!NIqc$3#4!!&Y!!!!+J!V!*)-!*)!"J!!!!)
  11841.  
  11842. !!!,rX`!!$3#2!!*Z!!-!!!!!!*-!P!d!N`!"-3!!!#i!-2qb#[qb!!3+G(KNE!d
  11843.  
  11844. !P!!"-3!!!#d!,[qa#[qa!!3+BA0MFJ)!M3!#!*ArX!d!P3!"6!!!!$)!4!#@$3#
  11845.  
  11846. @!!*L!!!!-J"$!*F!Q!d!P`!#BJ!!!$)!2`#C!*S0!*N!!Q)!!!!b!$d!Q`#F$3#
  11847.  
  11848. E!!*L!!!!-J!j!*d!RJd!R3!#BJ!!!$)!0`#I!+!0!*m!!Q)!!!!b!$8!S3#L$3#
  11849.  
  11850. K!!&Y!!!!-J!c!+--!+-!"`!"1J!#!!!0!+)!!@m!!!!c!$6rV`[rV`!,-!!(GQp
  11851.  
  11852. XEQ&YC3!!$3#J!!&Y!!!!03!f!+3-!+3!"`!"1J!#!!!0!*i!!@m!!!!h!$MrVJ[
  11853.  
  11854. rVJ!1-!!&F'&bD@3!"A"KFNP%$3#F!!&Y!!!!13!m!+8-!+8!"`!"1J!#!!!0!*S
  11855.  
  11856. !!@m!!!!p!$lrV3[rV3!*-!!&CQjKE@8!!!d!Q!!"E3!!!$m!3J#Q$!#Q!!F!!6S
  11857.  
  11858. !!J!!![q`!!!#!&F!!J#R!+J0!+F!!Q`!!J!!!!$rV2qV!IqX!!!"rkX!!!)!U!!
  11859.  
  11860. #!+N!UJd!U3!#D3!!!!X!$J#V!+`0!+X!!dN!!!!!!!$rUJ#YrkN,rkS!%$!!"Q4
  11861.  
  11862. [Ff9ZC!!'C'p6C@jN!J#Y!!)!V[qS$3#Z!!&[!!!!!!!!rkF,rkF!$c!!#f&dG'&
  11863.  
  11864. MD'ePER4c!!!#rkJ!!!,rU3!!$3#X!!&V!!!!!!!q!+m#!+m!!J#`!,%0!,!!!Q`
  11865.  
  11866. !!3!!!!$rTJ#b!IqQ!!!-!,)!1!!b)(0PEQ3JG'KP)'ePFh0KCf8JGfPdD#"dD'8
  11867.  
  11868. JBA"`FQp`FQPKG'8JBA4dB@0SE@9ZG(-!!J!!!J#a!!)!XrqP$3#c!!*2!!!!!!!
  11869.  
  11870. q!,3!Y3d!Y!!"D`!!!!3!23#f!J#f!!)!Y`#i$3#h!!0*!!)!"!!5rk3!Z3#k#[q
  11871.  
  11872. N!"JZBfpbC@0bC@`U+LSU!!!!!!!!N!!!ER9XE!d!Z3!"E3!!!!3!"IqM#[qM!!3
  11873.  
  11874. +CA908`B!ZJ!$rk)!ZrqK#[qL!!3+D@jcD!d!Z`!#EJ!!!!B!$J#m!,d0!,`!!$X
  11875.  
  11876. !!!!0!!i0!,d!!Qi!!!!'!!d![J#r$3#q!!)d!!!!#J!0rk!!`!VrS!!%#Q9e68)
  11877.  
  11878. 0!-!!!@d!!!!,!!`!`3`!`3!*!!0[GA3!!J!!$3#r!!)d!!!!"J!+rjm!`JVrR`!
  11879.  
  11880. %#Q9e68B0!-)!!@d!!!!)!!N!```!``!'!!!!!J!!"[qK!!!#!,J!!J$%!-80!-3
  11881.  
  11882. !!R)!!!!6!#!!aJ$($3$'!!&[!!!!%`!Brji,rji!$6!!#A*PBfP`D@9ZG!!!$3$
  11883.  
  11884. (!!*Z!!!!!!!!!-J!b3d!b!!#0!!!!"`!(rqG!-S+rjd!"!TPG8CN$3$+!!&Y!!!
  11885.  
  11886. !(3!H!-X-!-X!#!!#G'm!!J!!$3$*!!)d!!!!'!!Frj`!c!VrR!!%#Q9e69-0!-`
  11887.  
  11888. !!@d!!!!D!"[rQ`2rQ`!!!J$&!!)!c3$1$3$0!!*b!!!!)3!U!-m!d!d!c`!"E3!
  11889.  
  11890. !!#%!)J$4$!$4!"-!$8CTE'8J9(*KER0QCA)!!J!!$3$3!!*Z!!!!!!!!!0)!d`d
  11891.  
  11892. !dJ!#0!!!!#B!+IqD!03+rjS!"!TPG8CN$3$8!!&Y!!!!*`!S!08-!08!$3!(Fh9
  11893.  
  11894. LDQ9MG!!#!!!0!0-!!M3!!!!L!#ErQ3$@#[qC!!3+CA908`d!eJ!"E3!!!#3!*Iq
  11895.  
  11896. B!rqB!!!#!-i!!J$A!0J0!0F!!R)!!!!V!$3!f3$D$3$C!!&[!!!!+`!XrjF,rjF
  11897.  
  11898. !$c!!#f&dG'&MD'ePER4c!!!0!0S!!Qi!!!!!!!!!f`$F$3$E!!)d!!!!-!!crjB
  11899.  
  11900. !h3VrPJ!%#Q9e4Q30!0d!!@d!!!!a!$)!hJ`!hJ!6!!eB,8&dG'&MD'ePER4c!!)
  11901.  
  11902. !!!d!h!!#0!!!!#`!-2q9!0m+rj8!"!TPG8e6$3$I!!&Y!!!!,J![rj3$rj3!!!)
  11903.  
  11904. !f!!#!1$rN`d!i!!$53!#!$8!2Iq5!1(rN3VrNJ!B,N066feP8A9PER9XE!!!!!!
  11905.  
  11906. !!!!!CA908`d!i3!#0!!!!$8!1Iq3!!$L#[q3!!!%#Q9e69-0!1)!!@d!!!!h!$M
  11907.  
  11908. rM`2rM`!!![q4!!!#rj-!!!d!Y3!"E3!!!!!!!3$M$`$M!KS)ER9XE!!!!!!!!Gq
  11909.  
  11910. !rri!!+fq"N9eC'pbB3!I9!%Db(3!$`!!)!!!&-dZ!!!!!2rr!!!I!!!!"R`!!!!
  11911.  
  11912. -!!!!I`!)!#!!#h6`!!YpBJ!!(e3"'N066fd!!"%!B@aTF`!!!!!"[!!#!!!(3h9
  11913.  
  11914. YG@aeF`!!!!!!!!!!!!!!!!!!!!!!!!!!TE(J`%*%!!!!!+fq"N9eC'pbB3!!!!!
  11915.  
  11916. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  11917.  
  11918. !!!!!!!!!TX#T)PEc39"36%066fhrrrrr!!!!&3!!!!!!!!!!!!!!!!!!!!T1CA4
  11919.  
  11920. hEh*VD@jR!!%!#!!!VEi!!(J,!!)!*N0eEA9XGA-k3A"`E'PMBA4TEfjc1NjPG(G
  11921.  
  11922. [FQYTEQFk4A9NEh*K!!N!U!#SB@C`E3!!!!!!!`!B!$N!@3"e!*8!RK499d%J3fp
  11923.  
  11924. YF&0MD5"(EQ4'E'p[FJ!!!!!!!!!!!!!!!!G&FQP[C'pZ!!!!!!!!!!!!!!!!!!!
  11925.  
  11926. !!!!!!!!!!!!!"d0eEA9XGA-!!!!!!!!!!!!!!!!!!!!!!!!!!!94G@PZEJ!!!!!
  11927.  
  11928. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(!#i(3h9
  11929.  
  11930. YG@aeF`%3rrm!!!!!!!8##%#"(2!!!!!!TE(J`!!!VEi!!+E!rrrrr`!"rrm!!!,
  11931.  
  11932. rT3!!!J#U!!)!j2q1$3$N!!*X!!)!!!!!rihrM!(rM3!!!Iq-!!!#rii!!!i!!J!
  11933.  
  11934. !$a!!!`!'riX!j3!c!1B!j`$S!Iq,!!!3!18!"2q+riRrL2q(#rq+!!d`!!PbC@0
  11935.  
  11936. TF'PPER3!!!VrL3!B,Q&PGR4[C'pMER9XE!!!J!!!!"!!B@aTF`[rL!!J-!!1B@a
  11937.  
  11938. TBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9b#rq(!"!`!!CNEh0PEQ3!"Q4[8f9
  11939.  
  11940. ZC!i!jJ!(%2q'!$RrKIq%!1N!k[q$#[q'!"JZB@9fG'pNEf0ZG@aX!!#!!!!!%!"
  11941.  
  11942. KE'Pc#rq&!!d`!!PQD@aPAfaTFh3!!!,rK!!!%!$T!!2rJ[q"ri!,ri)!$6!!#@C
  11943.  
  11944. TE'9IE'PcG!!!#rq"!!m`!!YKG(4KBfKYC@jdF`!!#rq!!!8`!!&T!!!3!1S!"`"
  11945.  
  11946. $rhrrI[pprh`!82pl#[pr!!3+DfpME!VrIJ!%#Q0[BQS+rhd!'#jMEh*PBfjdC5S
  11947.  
  11948. U+LS!!!!!!!!3!#SU+LS,rh`!)$!!$Q&XD@&cG'pYEfjcG'9b!!jKE'PKFe4[6@p
  11949.  
  11950. ZFh4PFJ[rH`!3-!!'C'pcC@jN!!CNEe0PEQ34ri-!,Z"&8E&2&`!JS&[KiQ`-!!0
  11951.  
  11952. VD"X!!U%USQXV!!3Pj59&X9Y2@IrZ6bUKDbX!"Jm1!1F!"a$rHJ"CrhRrH!$V!1c
  11953.  
  11954. rG`[rHJ!J-!!1B@aTBA0dEfe[ER0dCA)!$Q&XD@&c9'p0EfjcG'9b$[pj!!)%rhB
  11955.  
  11956. !l32rGJ!"$J$Y!!%!rh8,rh8!$6!!#A4SC9pKE'PKF`!!![pi!!!3!1X!"2pdrh2
  11957.  
  11958. rF[pa#rpd!!d`!!PdD'9IB@aTBA-!!![rF`!1-!!&F'&bD@3!"A"KFNP%#rpb!!X
  11959.  
  11960. `!!GfEfaZB@eP!!!,rh%!#6!!"@CZB@eP!!!3!1`!%[p`rfrrE[pYrf`!E[pVrfS
  11961.  
  11962. !GIpTrfMrCrpQ!*)!S`#N!+8!TJVrF!!%#QCcFb!+rfm!"!T'8Np0#[pZ!!3+8dP
  11963.  
  11964. D432rE3!%#[pX!!3+9%mJ)!2rD`!'#[pU!"JZFhPcEd0"8e3U+LSU!!!!!!!!!!!
  11965.  
  11966. U+LSU#[pT!!3+BA0MFJVrD!!%#R4iC'`+rfF!"!T849K8#[pQ!!3+BfPdE4(rG`"
  11967.  
  11968. &S1!Qi@hLiq6PjJ`!"d@a6qKVGXRU,%C2S1XQl'X[4E*2S1XQl'N[4E02l@YfbHS
  11969.  
  11970. X4NrZSLA[*D%PB3!3*D-PB3!4*3m2$J$S!!F3rf8!V2pNrf-!lJ$[rf),rf8!%$!
  11971.  
  11972. !"Q4[Ff9ZC!!'C'p6C@jN$[pN!!)%rf%!m!2rB3!"$J$`!!%!rf!,rf!!$c!!#f&
  11973.  
  11974. dG'&MD'ePER4c!!!#rf-!!"!!lJ!"rem,rem!$c!!#f&dG'&MD'ePER4c!!!3!1m
  11975.  
  11976. !$J$MrelrAIpF!-2r@`$"reVr@3$,!0%!e3$HreJ+rei!"!TPG8e6#[pG!!3+D@j
  11977.  
  11978. cD!VrA!!%#Q9e68B+reX!"!TPG8e##[pD!"JZBfpbC@0bC@`U+LSU!!!!!!!!N!!
  11979.  
  11980. !ER9XE!Vr@3!%#Q9e4Q3+reJ!'#j$8dpYC9&eC@jeE'`!!!!!!!!!!'9e69-4rf)
  11981.  
  11982. !2q!5!$[KiLVMj#rPjLmfE!`!"dpL!!%!!#VKDLrSk5p'6qSUi@S[k1X[4NqJ+Z&
  11983.  
  11984. U,qMX,dC2+Z&U,fS-!!e9$`"KFf0b!!%!$IVHhUd!!!$Y8f9ZC(-JB@jjG'KTEQF
  11985.  
  11986. JH@pe)'4bEh!JEfiJDA3JG'mJG'KP)'eKD@`JB@4NFQ9cFb"cF'9MD@CTC@3JBRN
  11987.  
  11988. JG'KP)("bEh"PFR4j)#*bC@0TF'PPER3L,L!J@@pe)'eeFh3JD'&fC5"dD'8J8(*
  11989.  
  11990. [Ch*KE@ePFY9c)&4[Ef`J+'CdF$S[,fGKC@%ZDfGc,R9VB@jc,Q9NG5pKF("XCA0
  11991.  
  11992. MFQP`G#p[Ff&iC@i[F'GY9'p[E#jcDA3ZD(&i+5"cBh*TF(4TEQFJCAKdC@jcD@p
  11993.  
  11994. Z)'PZFh4KE'aPC#"dEb"eFf8JG'KTFb"cBh*TF(3Z!!!!&J!"!!!!!!!1!!S!%!!
  11995.  
  11996. !!!`!!!!!!!!!!!!#!!!!!!!B!!!!+!!!!!!!!!!)!!!!)!#N2c`!!DR`!!!!l!!
  11997.  
  11998. !!!&19[ri,`0f!#m$-$bKVDG'*KmY52ri,`-`2+LITdBQ(b!ZrrLa`'FJ,`-J2'0
  11999.  
  12000. `ER4"l[rm)NLKV5+)*Kp+3'B)5Ulrr'F#GJ%3!bBZrr41ANje6PB!!#m-@Bm[2%j
  12001.  
  12002. 29%Nr2!#!U"mSAb!-CJK`!cm!UFKJ+#m-UC)J9#!)d+J!'#&!!"JJ9#!)d+J!(#&
  12003.  
  12004. !!"a9Mbm8)&qJAMk!9%mSE[rm6Pj1G8j@!!![$%kkre4+!'FU@Bm[2'&`E(3[2(0
  12005.  
  12006. MF(4`)DJU+&mJ$'F5@Bm[$#mm!!!!!A!!U#UTp&K26VVrG#KZrra1ANje!!!!0'4
  12007.  
  12008. `E(3!!!!"4P*&4J!$!!!!J3!"!))!!J#$!!-!K%P$6L-!!`!!!*F!!3!!!!)!!!!
  12009.  
  12010. $!!!!!!!"!!!!!!G"8&"-!!!!!!!!"bSU+LS!!3!!!!!(CQpXC!!#!!!!!!GNDA0
  12011.  
  12012. V!!-!!!!"!!!!Km!!!8I!!!)R`!!%&m!!#!r!!"!(`!(J"m!#%!I!"!Jrq!J)(r!
  12013.  
  12014. 3%!rJ)#!(d%"3!iM`L!%%L33!!SB%!!'%!J!#3!)!"#!#!!J3!J!3#!3!)"3)!%!
  12015.  
  12016. N%!#!3L!"!%*!!J"#`!3!)b!)!"i3%!!!##!!!!4!!!!#J!!!!3!!!!#(`!!"am!
  12017.  
  12018. !!qI!!!Ih`!!2rm!!(rr!!Irr`!2rrm!(rrri$rrrm"rrrq!rrrr`Irrrq2rrrrc
  12019.  
  12020. rrrrqrrrrrrrrrrjrrrrm2rrrq"rrrr!2rrrJ(rrr`$rrri"rrrm!Irrq!(rrr!!
  12021.  
  12022. r2rJ!(Kr`!!!2i!!!"m!!!!1!!!!"!!!!!!)!!!!!!!!!!!$`!!rrr`!!!!!!!!!
  12023.  
  12024. !!!!2$`!2GAm!!!!!!!!!!!!!m!$`$eGI!!!!!!!!!!!!$`!!$`peI`!!!!!!!!!
  12025.  
  12026. !!2!!!!$r9em!!!!!!!!!!!m!!!!!$h9r!!!!!!!!$rr`!!!!!!pAA`!!!!!!!2$
  12027.  
  12028. -h`!!!!!2GAm!!!!!!!m!$-c`!!$rreGIrr!!!!$`!-c0m!!!$h9eGAm!!!!2!!c
  12029.  
  12030. -h`!!!!$h9eI`!!!!m!$-cI!!!!!!$h9r$`!!$`!-c0rI!!!!!!$hm!$`!2rrc-h
  12031.  
  12032. phI!!!!!!$`!!$`$qh2cIhFcI!!!!!!!!!!$`rFc2rGc!cp!!!!!!!!!-crc-$mh
  12033.  
  12034. -!-h`!!!!!!!!c2!2!-$-`!c0m!!!!!!!$-m!!2!-$!$!cI!!!!!!!-c`!!!2!-!
  12035.  
  12036. -$-h`!!!!!!c2!!!!!2!!`-cI`!!!!!$-m!!!!!rI$!c0r-!!!!!-c`!!!!$phm$
  12037.  
  12038. -hmc!!!!!c2!!!!!2hFcmcIc-!!!!$-m!!!!!$pc-r0r-`!!!!-c`!!!!!!r-`2h
  12039.  
  12040. rc!!!!!c2!!!!!!!!r!cr!2c!!!$-m!!!!!!!!!rrm!!2c!!-c`!!!!!!!!!!!!!
  12041.  
  12042. !!2c!c2!!!!!!!!!!!!!!!!!2c-m!!!!!!!!!!!!!!!!!!2c`!!!!!!!!!!!!!!!
  12043.  
  12044. !!!!2!!!!!!!!!!!!!!"!!,J"H!)i($JLrN4mc$Ub%D%#334L#*33Q#"d3!+!!3!
  12045.  
  12046. !Z!(i!rJIq$rqIrcrr[rrrrjrr(rirr$ri(I!!i!"!!!!!)!!!!!!m2r`!!!!!!m
  12047.  
  12048. 2pI!!!!!!m!$hm!!!$rm!!2A`!!$`c2$rprr`$`c2!!peI`$rc2m!!2I`m2hrh2!
  12049.  
  12050. !$`$2r2h!c`!!$2!2$!c2!!$2!!r`c2`!$2!!rFr2c!$2!!$m$rc!$2!!!!rr$m$
  12051.  
  12052. 2!!!!!!!!r2!!!!!!!!!2!!!!!!!!!2p6Bh*TF(3J3A"`E'PMBA4TEfi0$90PEQ4
  12053.  
  12054. c)'&ZHA4SD@jR)(P[G5"NFQp`)'pZ)'Pd)(4[)(4SC5"YB@PX)'&NC(*PFh-JFh"
  12055.  
  12056. PBfPQD@9N)'*j)(4SC5"`FQp`CA*dH5!LFQ9MDA"TC@jd)LiJ)&P[G5"YGA0d)'K
  12057.  
  12058. KGQ8JG'KP)&"bEfGbB@eYCA,9Fb"8EfpX)#KQG(!k,bpRB@9K,QYRFbjeDf&ZFbj
  12059.  
  12060. PC(8[BA"`E'9cBh*TF(3[Eh0KH'9Z,h"RE94[Ef`ZFfPd,QKaH#NJFf0bDA"dD@j
  12061.  
  12062. R)'9iG'9ZFfP[EL"TER0dB@aXC@3JG'mJGA0P)(4SDA-JFf0bDFN!!!!5!!)!!!!
  12063.  
  12064. !!!!!!!!"!!B!"K1*!!!!#PMJ!!-J!!!$)!!!!!!8!,3#+`-@!qd!E`(h!f-%A3!
  12065.  
  12066. !!!!!!!%!!!!MT`!!)UF!!!'Z!+d++"2@!!!!(!'Z!""16e4*!!!!LR0MFhS!!!#
  12067.  
  12068. @Ff0`G!!!!+*849K8!!%!VR0dH@`!!!$'Fh"cD!!!!0*$6d4&!!%!hN*14%`!!!$
  12069.  
  12070. fC("XG!!!!3*'8N9'!!-"$NP$6L-!!!%qD@0X0!!!!8TTBh-M!!!"9QPMFc3!!!&
  12071.  
  12072. LD'CNFJ!!!@j659T&!!!"HPG3Eh-!!!''!)$rre!!!!!!V44m!!$rr`!!!(`!V4(
  12073.  
  12074. F!)$rr`!!!*S!V4,J"'Mrr`!!'a)!V4&m%iRrr`!!)@J!V4Kd"'Mrr`!!(!-!V44
  12075.  
  12076. d!!$rr`!!("d!V45!!!$rrb!!(#-!V45N!!(rra3!($m!V45J!)$rr`!!(5m!V45
  12077.  
  12078. F!!$rr`!!(@F!V45B!)(rr`!!(@`!V458!),rr`!!(AF!V453!!#$rrm!!"f#!+d
  12079.  
  12080. 8M!#%rrm!!"f0!+d5[!#Arrm!!"fB!+d5d!#Arrm!!"kF!+d4a!#Arrm!!##J!+d
  12081.  
  12082. 5$!#Arrm!!#$N!+d3U1R!rrm!!#*V!+d5"2rrrrm!!#+"!+d3q!#!rrm!!#+2!+p
  12083.  
  12084. hM,K!:
  12085. =========================================================================
  12086. Date:         Thu, 28 Apr 1994 08:40:05 -0600
  12087. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12088. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12089. From:         Tom Donovan <donovan@COVIS.NWU.EDU>
  12090. Subject:      Re: AS Interpreter
  12091.  
  12092. I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
  12093. when I happened upon a discussion of the HyperTalk "do" command and the
  12094. following example script:
  12095.  
  12096.         on mouseUp
  12097.                 ask "Please enter a line of AppleScript:"
  12098.                 if it is not empty then do it as AppleScript
  12099.         end mouseUp
  12100.  
  12101. It occurred to me that if one created a one-card stack with a field on it
  12102. to receive AS statements, one might be able to simulate a command-line
  12103. interface.  Granted, it would probably be painfully slow, but it's a start.
  12104.  
  12105. Just an idea...
  12106.  
  12107.  
  12108. --Tom
  12109.  
  12110. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12111. Tom Donovan           "Perhaps the most universal information trap is the...
  12112. System Administrator   trap of forgetting what it's like not to know. The
  12113. CoVis Project          minute we know something, we forget what it was like
  12114. Northwestern Univ.     not to know it."             --Richard S. Wurman
  12115.                                                       "Information Anxiety"
  12116. E-mail: donovan@covis.nwu.edu
  12117. (Check out the CoVis Web Server at URL: http://www.covis.nwu.edu/)
  12118. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12119. =========================================================================
  12120. Date:         Thu, 28 Apr 1994 14:55:05 GMT0BST
  12121. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12122. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12123. From:         "Alistair G. Lowe-Norris" <agl1@LEICESTER.AC.UK>
  12124. Subject:      Complete AppleScript Handbook - Out of Print
  12125.  
  12126. I have just tried to obtain a copy of this through my normal
  12127. University book-shop and have been told that it is now out-of-print.
  12128.  
  12129. I contacted MacLine (UK) and grabbed the last copy off of their
  12130. shelves - they did not know it was OOP.
  12131.  
  12132. Does anyone know whether it is OOP and if so when it is being printed
  12133. again.
  12134.  
  12135. Alistair.--
  12136. ---------------------------------------------------------------------------
  12137. | Alistair G. Lowe-Norris, Systems Programmer      E-mail : agl1@le.ac.uk |
  12138. | Computer Centre, Leicester University,                                  |
  12139. | University Road, Leicester LE1. 7RH., U.K.                              |
  12140. |                                                                         |
  12141. | UK       Tel: (0533) 522250     Fax: (0533) 525027                      |
  12142. | Non-UK   Tel: +44 (533) 522250  Fax: +44 (533) 525027                   |
  12143. ---------------------------------------------------------------------------
  12144. =========================================================================
  12145. Date:         Wed, 27 Apr 1994 21:16:15 PDT
  12146. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12147. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12148. From:         network_manager@ALDUS.COM
  12149. Organization: Aldus Corporation, Seattle, WA
  12150. Subject:      NDN:Re: parsing text in AppleScr
  12151.  
  12152. Your mail to the Microsoft Mail Server could not be fully
  12153. delivered!   No Valid Addresses!   It has been deleted.
  12154.  
  12155. Error List:
  12156.   Bad 'To:' Address: David Rogers,Eng@Sea12
  12157. =========================================================================
  12158. Date:         Thu, 28 Apr 1994 11:13:01 -0500
  12159. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12160. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12161. From:         Steve Alex <steve_alex@POSTOFFICE.AIDT.EDU>
  12162. Subject:      PowerShare Mail
  12163.  
  12164. We are in the midst of a painful process of moving to PowerShare Mail from
  12165. QuickMail. We've got QuickMail AOCE so that the users have a somewhat
  12166. familiar face, but there are a couple of missing features that are causing us
  12167. grief.
  12168.  
  12169. 1. There is no way of knowing whether a mail message has been read or not (or
  12170. return receipt), you just know that it had been sent to the PowerShare
  12171. server. We've tried to use mail as the primary means of sending
  12172. correspondence. If it is important, the users will check the mail log to see
  12173. if mail has been read in what they consider an adequate amount of time, if
  12174. not they may revert to ancient means of communication, such as the phone
  12175. system!
  12176.  
  12177. 2. Notification of new mail arriving does not happen unless the user
  12178. remembers to unlock their key chain.
  12179.  
  12180. 3. If PowerShare temporarily loses a service (network glitch, etc.) it
  12181. creates an alert condition that must be cleared before new mail is received,
  12182. but the user is not alerted about the problem unless they open their In Tray
  12183. (and see the alert icon and correct the problem).
  12184.  
  12185. 4. We've lost the QuickConference capability.
  12186.  
  12187. While most of these "missing features" are problems with PowerShare, I'm
  12188. looking for temporary fixes, possibly with AS.  I've been tempted to put a
  12189. FaceSpan (Frontmost) application that's kind of an administrator's aid (if
  12190. the FaceSpan memory leak is fixed) on everyone's machine. It could
  12191. periodically check if the key chain is unlocked (GTQ's "get user" will return
  12192. an error if keychain is unlocked). If I could figure out how get to the read
  12193. check mark, I might be able to respond to a "has message been read" request.
  12194. I could probably even implement a QuickConference hack.  But maybe someone
  12195. knows of a better way of dealing with these problems, possibly on the server.
  12196.  
  12197.  
  12198. +---------------------------------------+----------------------------------+
  12199. | --------------+ Steve Alex            | All ideas here are my own and    |
  12200. |   +---------- | Alabama Industrial    | in no way reflect my employer's. |
  12201. |   | ----------+ Development Training  |              steve_alex@aidt.edu |
  12202. |   +---------------------------------- |                                  |
  12203. +---------------------------------------+----------------------------------+
  12204. =========================================================================
  12205. Date:         Thu, 28 Apr 1994 09:19:41 -0700
  12206. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12207. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12208. From:         Steve Michel <michel@NETCOM.COM>
  12209. Subject:      Re: Getting the FM Field Index
  12210.  
  12211. >Getting the FM Field Index in AS
  12212. >
  12213. >I'm trying to optimize a script by doing only searches for items that are
  12214. >actually in a database.  Now, FM can easily (and very quickly) give me a list
  12215. >of values in a field by giving me the index of that field (Edit, Paste
  12216. >Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  12217.  
  12218. There's no way to get the index of a field directly, but here's a handler
  12219. that first gets all the entries in a field (across the entire database or
  12220. shown set, and then removes all the duplicates:
  12221.  
  12222. on getUniqueItems of fieldName given dataBase:theFile
  12223.         tell application "FileMaker Pro" -- get everything from the field
  12224.                 copy Field fieldName of Document theFile to theList
  12225.         end tell
  12226.         copy {} to unqiueItems -- to hold only uniqe values
  12227.         repeat with x in theList
  12228.                 if x is not in unqiueItems then
  12229.                         copy unqiueItems & x to unqiueItems
  12230.                 end if
  12231.         end repeat
  12232.         return unqiueItems
  12233. end getUniqueItems
  12234.  
  12235. call it with something like:
  12236.  
  12237. copy getUniqueItems of "model" given dataBase:"pict catalog" to myList
  12238.  
  12239. This is none too fast, especially with large databases, but it does work.
  12240.  
  12241. Steve
  12242. =========================================================================
  12243. Date:         Thu, 28 Apr 1994 12:36:50 -0400
  12244. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12245. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12246. From:         John Schettino <js12@GTE.COM>
  12247. Subject:      Re: Getting the FM Field Index
  12248.  
  12249. >>Getting the FM Field Index in AS
  12250. >>
  12251. >>I'm trying to optimize a script by doing only searches for items that are
  12252. >>actually in a database.  Now, FM can easily (and very quickly) give me a list
  12253. >>of values in a field by giving me the index of that field (Edit, Paste
  12254. >>Special, Paste Index), so ... how do I get that Index from FM Pro to AS?
  12255. >
  12256. >There's no way to get the index of a field directly, but here's a handler
  12257. >that first gets all the entries in a field (across the entire database or
  12258. >shown set, and then removes all the duplicates:
  12259. >
  12260. >on getUniqueItems of fieldName given dataBase:theFile
  12261. >        tell application "FileMaker Pro" -- get everything from the field
  12262. >                copy Field fieldName of Document theFile to theList
  12263. >        end tell
  12264. >        copy {} to unqiueItems -- to hold only uniqe values
  12265. >        repeat with x in theList
  12266. >                if x is not in unqiueItems then
  12267. >                        copy unqiueItems & x to unqiueItems
  12268. >                end if
  12269. >        end repeat
  12270. >        return unqiueItems
  12271. >end getUniqueItems
  12272.  
  12273. >This is none too fast, especially with large databases, but it does work.
  12274.  
  12275. If you have AS1.1, you can speed it up using the following:
  12276.  
  12277. on getUniqueItems of fieldName given dataBase:theFile
  12278.         tell application "FileMaker Pro" -- get everything from the field
  12279.                 copy Field fieldName of Document theFile to theList
  12280.         end tell
  12281.         set unqiueItems to {} -- to hold only uniqe values
  12282.         repeat with x in theList
  12283.                 if x is not in unqiueItems then
  12284.                         set end of unqiueItems to x
  12285.                 end if
  12286.         end repeat
  12287.         return unqiueItems
  12288. end getUniqueItems
  12289.  
  12290. A minor change, but it does eliminate quite a bit of time on all the list
  12291. copies.
  12292.  
  12293. - john
  12294.  
  12295. -----------------------------------------
  12296. js12@gte.com             GTE Laboratories
  12297. John Schettino                Waltham, MA
  12298. =========================================================================
  12299. Date:         Thu, 28 Apr 1994 09:45:50 U
  12300. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12301. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12302. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  12303. Subject:      Re: Getting the FM Field In
  12304.  
  12305. Reply to:   RE>>Getting the FM Field Ind
  12306. Say, a related question then:   How big can lists get in AS? In other words,
  12307. can AS handle a list that will be 16,000 items long? If not, can I just
  12308. increase the memory allocation for the application created, and if so, to
  12309. what?
  12310.  
  12311. -roy
  12312. =========================================================================
  12313. Date:         Thu, 28 Apr 1994 12:01:17 -0600
  12314. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12315. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12316. From:         "Desmond K. Mullen" <mulle009@MAROON.TC.UMN.EDU>
  12317. Subject:      Re: AS Interpreter
  12318.  
  12319. Or you can just type stuff into a field in HyperCard and execute it at the
  12320. press of return or enter or whatever you choose.
  12321.  
  12322. My Messenger application has that AS feature. Messenger is for one-to-one
  12323. chatting over AppleTalk LANs, but you can also type AppleScript commands
  12324. and select "Do AppleScript Commands" from the AS menu.
  12325.  
  12326. Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
  12327. application, and is available at sumex-aim, umich and all their mirrors.
  12328.  
  12329. -DM
  12330.  
  12331.  
  12332. >I was reading through HyperTalk 2.2: The Book, by Winkler, Kamins, & DeVoto
  12333. >when I happened upon a discussion of the HyperTalk "do" command and the
  12334. >following example script:
  12335. >
  12336. >        on mouseUp
  12337. >                ask "Please enter a line of AppleScript:"
  12338. >                if it is not empty then do it as AppleScript
  12339. >        end mouseUp
  12340. >
  12341. >It occurred to me that if one created a one-card stack with a field on it
  12342. >to receive AS statements, one might be able to simulate a command-line
  12343. >interface.  Granted, it would probably be painfully slow, but it's a start.
  12344. >
  12345. >Just an idea...
  12346. >
  12347. >
  12348. >--Tom
  12349.  
  12350. Desmond K. Mullen - University of Minnesota, Office of Admissions
  12351. mulle009@maroon.tc.umn.edu - 612/625-0824
  12352. =========================================================================
  12353. Date:         Thu, 28 Apr 1994 14:16:20 -0500
  12354. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12355. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12356. From:         Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
  12357. Subject:      Dialog Box
  12358.  
  12359. Simple question follows.  Given a dialog box that comes up with some text
  12360. highlighted and buttons to choose, cancel connect, how do I tell it to
  12361. choose a specific button?  Thanks.
  12362.  
  12363.                                                 LEO
  12364.  
  12365. ------------------------------------------------------------------------
  12366. Michael Leo                         |    University Of Pennsylvania
  12367. mleo@eniac.seas.upenn.edu           |      School Of Engineering
  12368. mleo@wkstas.section.upenn.edu       |  Computer Science & Engineering
  12369.                                     |      maybe Management also
  12370. finger @kin648.resnet.upenn.edu     |
  12371. talk @kin648.resnet.upenn.edu       |
  12372. -------------------------------------------------------------------------
  12373. =========================================================================
  12374. Date:         Thu, 28 Apr 1994 14:20:18 EST
  12375. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12376. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12377. From:         Sam McLane <Sam_McLane@COMPSERV.OCIS.TEMPLE.EDU>
  12378. Subject:      Re: Dialog Box
  12379.  
  12380. Simple question follows.  Given a dialog box that comes up with some text
  12381. highlighted and buttons to choose, cancel connect, how do I tell it to
  12382. choose a specific button?  Thanks.
  12383.  
  12384.                                                 LEO
  12385.  
  12386. I guess by it you mean the script, as in a default button?
  12387.  
  12388. Try this
  12389.  
  12390. display dialog "Hello world"  Buttons {"OK","Cancel","foo"}
  12391.     default button "Ok"
  12392.  
  12393. -Sam McLane
  12394. sam@astro.ocis.temple.edu
  12395. =========================================================================
  12396. Date:         Thu, 28 Apr 1994 14:41:04 -0500
  12397. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12398. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12399. From:         Allan Marcus <allan_marcus@LANL.GOV>
  12400. Subject:      Boot time OASX???
  12401.  
  12402. Anyone know of a script or OASX thast can tell me the time the user booted
  12403. the MAc?  (that's boot-up, not kicked!)
  12404.  
  12405. Thanks,
  12406.  
  12407. Allan
  12408.  
  12409. ---------------------------------------
  12410. Allan Marcus
  12411. Los Alamos National Laboratory
  12412. "My opinions are my own, I think..."
  12413.  
  12414. Voice: 505-665-1828
  12415. CIS: 76666,2113
  12416. AppleLink: Allan.Marcus
  12417. e-world/NewtonMail: Allan.M
  12418. InterNet: allan_marcus@lanl.gov    <- note new address (deja vu!)
  12419. ---------------------------------------
  12420. =========================================================================
  12421. Date:         Thu, 28 Apr 1994 15:31:53 -0400
  12422. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12423. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12424. From:         "George R. Brown" <gbrown@PARTECH.COM>
  12425. Subject:      Re: Dialog Box
  12426.  
  12427. At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
  12428. >Simple question follows.  Given a dialog box that comes up with some text
  12429. >highlighted and buttons to choose, cancel connect, how do I tell it to
  12430. >choose a specific button?  Thanks.
  12431. >
  12432. >                                                LEO
  12433. >
  12434. >I guess by it you mean the script, as in a default button?
  12435. >
  12436. >Try this
  12437. >
  12438. >display dialog "Hello world"  Buttons {"OK","Cancel","foo"}
  12439. >    default button "Ok"
  12440. >
  12441. Along the same lines, is there a way to put up an ask box (similar to
  12442. HyperCard's ask command), fill it with a default, and determine which
  12443. button was selected (in case Cancel was selected)?
  12444.  
  12445.  - gb (george@partech.com)
  12446. =========================================================================
  12447. Date:         Thu, 28 Apr 1994 14:49:37 -0700
  12448. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12449. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12450. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  12451. Subject:      Re: Dialog Box
  12452.  
  12453. >At 02:20 PM 4/28/94 -0500, Sam McLane wrote:
  12454.  
  12455. >Along the same lines, is there a way to put up an ask box (similar to
  12456. >HyperCard's ask command), fill it with a default, and determine which
  12457. >button was selected (in case Cancel was selected)?
  12458.  
  12459. The display dialog command is a Scripting Addition.  As such, it has an
  12460. AppleScript Dictionary, which you can easily open.  [In AppleScript 1.1,
  12461. the open file dialog for the Dictionary includes a button which takes you
  12462. directly to the Scripting Additions folder (even when you are already there
  12463. <sigh!>).]
  12464.  
  12465. Here's the Dictionary entry:
  12466.  
  12467. display dialog: Display a dialog.
  12468.     display dialog  anything  -- title of dialog
  12469.         [default answer  anything]  -- default editable text
  12470.         [buttons  list]  -- list of up to three buttons
  12471.         [default button  anything]  -- name or number of default button
  12472.         [with icon  anything]  -- name or id of the icon to display
  12473.         [with icon  stop/note/caution]  -- display one of these system icons
  12474.     Result:   reply  -- record containing the button hit and text entered
  12475. (if any)
  12476.  
  12477.  
  12478. So, yes, you can do what you ask (the reply can be looked at to see which
  12479. button was hit, and what the user typed if the Cancel button wasn't hit).
  12480. Experiment.
  12481.  
  12482.    --John
  12483.  
  12484. --
  12485. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  12486. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  12487. =========================================================================
  12488. Date:         Thu, 28 Apr 1994 13:40:16 -0800
  12489. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12490. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12491. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  12492. Subject:      Re: Boot time OASX???
  12493.  
  12494. >Anyone know of a script or OASX thast can tell me the time the user booted
  12495. >the MAc?  (that's boot-up, not kicked!)
  12496.  
  12497. How about an applet that launches at startup (sitting in the startup
  12498. folder), writes a time stamp to the end of a text file, maybe culls out
  12499. some of the old entries or keeps a maximum number of paragraphs in the text
  12500. file and then closes the text file and quits. Then you could open the text
  12501. file and read it.
  12502.  
  12503. Just an idea.
  12504.  
  12505. Kee Nethery
  12506.  
  12507. _________________________________________________________________
  12508. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  12509. =========================================================================
  12510. Date:         Thu, 28 Apr 1994 19:51:26 EDT
  12511. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12512. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12513. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  12514. Subject:      MS: MIME Headers
  12515.  
  12516. Words from the LISTSERV Gods regarding the troubles some of you have had
  12517. regarding MIME headers being lost:
  12518.  
  12519. Eudora users who submit postings to MACSCRPT should send the command
  12520.    SET FULLHRD ON
  12521. to listserv.  This will cause their subsequent postings to retain the
  12522. Mime header line.
  12523.  
  12524. This accounts for why some postings looked correct --- those from users
  12525. who had set the header status to full.
  12526.  
  12527. -A
  12528. =========================================================================
  12529. Date:         Thu, 28 Apr 1994 19:26:15 -0600
  12530. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12531. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12532. From:         Brian Caldwell <caldwell@WELL.SF.CA.US>
  12533. Subject:      APDA AppleScript Info
  12534.  
  12535. Just got my new APDA catalog (April 1994) and I thought I would share the
  12536. following info. From page 11 thereof:
  12537.  
  12538. (begin quote)
  12539. AppleScript Software Development Toolkit v. 1.1
  12540. Apple Computer, Inc.
  12541.  
  12542. Whether you're a commercial developer, in-house programmer, consultant, or
  12543. system integrator, building AppleScript support into your applications will
  12544. help you address the increasing demand to integrate off-the-shelf software
  12545. into custom solutions.
  12546.  
  12547. With AppleScript, you can compile scripts or create standalone applications
  12548. that let people perform complex operations by just clicking a mouse button.
  12549.  
  12550. This Software Development Kit includes the AppleScript language, system
  12551. software extension, and script editor; the FaceSpan Interface Processor
  12552. from Software Designs Unlimited Inc.; Data Access Language scripting
  12553. addition, development tools, sample code, and electronic documentation. It
  12554. also includes Finder scripting software that lets you control standard
  12555. Finder operations.
  12556.  
  12557. Licensing Note: Commercial developer redistribution licenses for
  12558. AppleScript system software are available through Apple Software Licensing
  12559. at (408) 974-4667.
  12560.  
  12561. System Requirements: A 68000 Macintosh computer or greater with 4 MB of
  12562. RAM, System 7 or later, and a CD-ROM drive.
  12563.  
  12564. Product Contents: Four Macintosh disks and one CD-ROM disc; three manuals:
  12565. The AppleScript Language Guide (English Dialect), Getting Started with
  12566. AppleScript, AppleScript Guide to Scriptable Applications; and a solution
  12567. developer's redistribution license for AppleScript system software and
  12568. FaceSpan runtime code.
  12569.  
  12570. AppleScript Software Development Toolkit v. 1.1
  12571. R0175Z/B.....$199.00
  12572.  
  12573. AppleScript Software Development Toolkit v. 1.0 to v. 1.1 upgrade
  12574. R0557Z/A......$99.00
  12575.  
  12576. (end quote)
  12577.  
  12578. And from page 10, the following may also be of interest:
  12579.  
  12580. (begin quote)
  12581. Apple Events/AppleScript Programming Tutorial
  12582. Apple Computer, Inc.
  12583.  
  12584. The Apple Events/AppleScript Programming Tutorial is the fastest way to get
  12585. ready for Apple event and AppleScript programming. This self-paced disk and
  12586. workbook tutorial teaches you the basics of Apple's new scripting
  12587. architecture. Using core modules from Developer University's classroom
  12588. course, this mini-course will teach you how to make your applications
  12589. script-ready and recordable. It will also prepare you to take advantage of
  12590. AppleScript software.
  12591.  
  12592. System Requirements: A macintosh Plus or later, with 4 MB or RAM and System
  12593. 7 or later.
  12594.  
  12595. Product Contents: One Macintosh disk and one workbook.
  12596.  
  12597. Apple Events/AppleScript Programming Tutorial
  12598. R0224LL/A....$150.00
  12599.  
  12600. (end quote)
  12601.  
  12602. Ordering info for APDA is:
  12603. Phone: U.S.       (800) 282-2732
  12604.        Canada     (800) 637-0029
  12605.        Int'nat'l. (716) 871-6555
  12606. Fax: (716) 871-6511
  12607. Hours: M-F 700am-500pm PT
  12608.  
  12609. E-mail:
  12610.   Applelink: APDA
  12611.   CompuServe: 76666,2405
  12612.   Internet: APDA@applelink.apple.com
  12613.   America Online: APDAorder
  12614.  
  12615. Mail:
  12616.   APDA
  12617.   Apple Computer, Inc.
  12618.   P.O. Box 319
  12619.   Buffalo, NY 14207-0319
  12620.   USA
  12621.  
  12622. Payment Methods:
  12623.   MasterCard, VISA, American Express, US Checks, postal money orders
  12624.  
  12625. NOTE: The above information is provided entirely as a net.service. I assume
  12626. no liability for your actions. I have no connection with Apple Computer,
  12627. Inc. or APDA. Trademarked names and service marks are property of their
  12628. respective companies where found above.
  12629.  
  12630. Peace,
  12631. Brian
  12632.  
  12633. ------
  12634. --=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
  12635. caldwell@netcom.com
  12636. caldwell@well.sf.ca.us                                     bcaldwell@aol.com
  12637. PGP 2.3 key available via public key servers or direct email
  12638. ----------------------------------------------------------------------------
  12639. "The future is not set. There is no fate but what you make."
  12640. - John Conner, "The Terminator", "Terminator 2"
  12641. --=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
  12642. =========================================================================
  12643. Date:         Thu, 28 Apr 1994 18:02:04 U
  12644. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12645. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12646. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  12647. Subject:      Exporting Records
  12648.  
  12649. Exporting Records
  12650. Anyone know of a way for AppleScript to tell FileMaker Pro to export found
  12651. records into a file?
  12652.  
  12653. (going both to the Macscript listserv group and the FMPro listserv group)
  12654.  
  12655. -roy
  12656. =========================================================================
  12657. Date:         Fri, 29 Apr 1994 09:19:58 +0800
  12658. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12659. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12660. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  12661. Subject:      Re: AS Interpreter
  12662.  
  12663. Peter Lewis and I were having intermitant problems of Script Daemon
  12664. refusing connection when supplied with a valid name and password.
  12665.  
  12666. A solution that seems to work is to give Script Daemon more memory.  There
  12667. are probably all sorts of bizarre fluctuating memory requirements when you
  12668. start dealing with Applescript in your programs.
  12669.  
  12670. Share and Enjoy,
  12671. Craig
  12672.  
  12673. --
  12674. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  12675. The University of Western Australia      or 380 3860 Email for FAX Number
  12676. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  12677. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  12678. =========================================================================
  12679. Date:         Thu, 28 Apr 1994 19:00:49 U
  12680. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12681. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12682. From:         Roy Rapoport <rsr@INETLINK.BERKSYS.COM>
  12683. Subject:      Scope
  12684.  
  12685. Scope
  12686. I'm experiencing a problem due to my ignorance regarding scope in AppleScript
  12687. scripts.
  12688. To give a simple example, look at this script:
  12689.  
  12690. --
  12691. set thelist to {"foo", "bar"}
  12692. on open (listoffiles)
  12693.         global thelist
  12694.         doit()
  12695. end open
  12696.  
  12697. on doit()
  12698.         global thelist
  12699.         display dialog (item 1 of thelist)
  12700. end doit
  12701. --
  12702. Now, this returns 'thelist is not defined' when run.  However, if I were to
  12703. do
  12704. --
  12705. set thelist to { "foo", "bar"}
  12706. doit()
  12707. on doit()
  12708. global thelist
  12709. display dialog (item 1 of thelist)
  12710. end doit
  12711. --
  12712.  
  12713. This works fine, and I get 'foo'.
  12714.  
  12715. Now, clearly, I'm missing something about the scope of thelist here.  I need
  12716. to find a way to tell doit() what thelist is, and while I did originally
  12717. figure I could just define thelist inside the 'on open' subroutine and give
  12718. it to all the subroutines, this seems rather wasteful and does seem to cause
  12719. some slowing ...
  12720.  
  12721. Any advice? Comments? Condescending sniggering?
  12722.  
  12723. -roy
  12724. =========================================================================
  12725. Date:         Fri, 29 Apr 1994 12:48:17 +0930
  12726. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12727. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12728. From:         "Paul J. Stoll" <mnpjs@GAMGEE.CC.FLINDERS.EDU.AU>
  12729. Subject:      Re : Boot time OSAX
  12730.  
  12731. >Anyone know of a script or OASX thast can tell me the time the user booted
  12732. >the MAc?  (that's boot-up, not kicked!)
  12733.  
  12734. How about the program "StarupLog v1.0", placed in your Startup Items,
  12735. writes the boot date & time to a Log file (text) which you can read/edit at
  12736. any time.
  12737. Just a suggestion.
  12738.  
  12739. Paul J. Stoll
  12740. Computer Systems Officer
  12741. Computer Assisted Learning Unit
  12742. Flinders University of South Australia
  12743. Flinders Medical Centre
  12744. Bedford Park.  5042.
  12745. South Australia.
  12746.  
  12747. Ph. : (08) 204 4163
  12748. Fax : (08) 277 0085
  12749. =========================================================================
  12750. Date:         Thu, 28 Apr 1994 22:50:48 -0700
  12751. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12752. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12753. From:         Scott Trotter <strotter@NETCOM.COM>
  12754. Subject:      Re: Boot time OASX???
  12755.  
  12756. >>Anyone know of a script or OASX thast can tell me the time the user booted
  12757. >>the MAc?  (that's boot-up, not kicked!)
  12758. >
  12759. >How about an applet that launches at startup (sitting in the startup
  12760. >folder), writes a time stamp to the end of a text file, maybe culls out
  12761. >some of the old entries or keeps a maximum number of paragraphs in the text
  12762. >file and then closes the text file and quits. Then you could open the text
  12763. >file and read it.
  12764.  
  12765. There's an even simpler, but very unreliable, way of doing this: Some INITs
  12766. and/or their preference files are modified at startup time. Pick one that
  12767. isn't modified at any time *other* than at startup, then use the standard
  12768. "Info for" OSAX to get it's modification date and time.
  12769.  
  12770. This method is completely non-transportable, guaranteed to eventually
  12771. break, bad enginering, a total kludge, etc, etc, but it'll work in a pinch.
  12772.  
  12773. --
  12774. ======================================================================
  12775. Scott Trotter          Desktop Strategies       Beaverton, Oregon, USA
  12776. email: strotter@netcom.com    fax: 503.641.2983    voice: 503.641.3741
  12777. =========================================================================
  12778. Date:         Thu, 28 Apr 1994 23:35:42 -0800
  12779. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12780. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12781. From:         Jon Pugh <jonpugh@NETCOM.COM>
  12782. Subject:      Re: Boot time osax
  12783.  
  12784. >Anyone know of a script or OASX thast can tell me the time the user booted
  12785. >the MAc?  (that's boot-up, not kicked!)
  12786.  
  12787. Jon's Commands 1.1 has a command "the ticks" which is the number of ticks
  12788. since the Mac was booted last. You can use that to calculate the time of
  12789. last boot with something like so:
  12790.  
  12791. set t to (the ticks) / 60
  12792. (current date) - t as date
  12793.  
  12794. This will probably have problems on a PowerBook which has been asleep since
  12795. its last boot.
  12796.  
  12797. Jon
  12798. =========================================================================
  12799. Date:         Thu, 28 Apr 1994 23:35:48 -0800
  12800. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12801. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12802. From:         Jon Pugh <jonpugh@NETCOM.COM>
  12803. Subject:      Re: Dialog box
  12804.  
  12805. >Simple question follows.  Given a dialog box that comes up with some text
  12806. >highlighted and buttons to choose, cancel connect, how do I tell it to
  12807. >choose a specific button?  Thanks.
  12808.  
  12809. I think he's asking how to drive a nonscriptable dialog (probably one which
  12810. does SLIP or PPP ;).
  12811.  
  12812. Too bad I don't have an answer.  :(
  12813.  
  12814. Jon
  12815. =========================================================================
  12816. Date:         Thu, 28 Apr 1994 23:35:54 -0800
  12817. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12818. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12819. From:         Jon Pugh <jonpugh@NETCOM.COM>
  12820. Subject:      Re: Scope
  12821.  
  12822. >Any advice? Comments? Condescending sniggering?
  12823.  
  12824. Scope?  Is my breath that bad?
  12825.  
  12826. >To give a simple example, look at this script:
  12827. >
  12828. >set thelist to {"foo", "bar"}
  12829. >on open (listoffiles)
  12830. >        global thelist
  12831. >        doit()
  12832. >end open
  12833. >
  12834. >on doit()
  12835. >        global thelist
  12836. >        display dialog (item 1 of thelist)
  12837. >end doit
  12838.  
  12839. Put "on run" around the first line and I think it will be more clear.  Any
  12840. statements outside a handler are implicitly in a run handler and only
  12841. executed if you press the run button or run the script some other way (i.e.
  12842. double clicking it when saved as an app or chosen from OSA Menu).
  12843.  
  12844. >Now, this returns 'thelist is not defined' when run.  However, if I were to
  12845. >do
  12846. >--
  12847. >set thelist to { "foo", "bar"}
  12848. >doit()
  12849. >on doit()
  12850. >global thelist
  12851. >display dialog (item 1 of thelist)
  12852. >end doit
  12853. >--
  12854. >
  12855. >This works fine, and I get 'foo'.
  12856. >
  12857. >Now, clearly, I'm missing something about the scope of thelist here.  I need
  12858. >to find a way to tell doit() what thelist is, and while I did originally
  12859. >figure I could just define thelist inside the 'on open' subroutine and give
  12860. >it to all the subroutines, this seems rather wasteful and does seem to cause
  12861. >some slowing ...
  12862.  
  12863. The proper thing to do is use a property.  Instead of your set command, use:
  12864.  
  12865. prop theList : {"foo", "bar"}
  12866.  
  12867. This will initialize theList at compile time, make it available to all
  12868. handlers within the script, and save the value of theList if you change it.
  12869.  
  12870. Cool, huh?
  12871.  
  12872. Jon
  12873. =========================================================================
  12874. Date:         Thu, 28 Apr 1994 23:44:21 -0800
  12875. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12876. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12877. From:         Jon Pugh <jonpugh@NETCOM.COM>
  12878. Subject:      Re: Dialog Box
  12879.  
  12880. >>Simple question follows.  Given a dialog box that comes up with some text
  12881. >>highlighted and buttons to choose, cancel connect, how do I tell it to
  12882. >>choose a specific button?  Thanks.
  12883.  
  12884. >I think he's asking how to drive a nonscriptable dialog (probably one which
  12885. >does SLIP or PPP ;).
  12886.  
  12887. >Too bad I don't have an answer.  :(
  12888.  
  12889. D'oh!
  12890.  
  12891. As soon as I mailed that I realized that the answer I know of is QuicKeys
  12892. 3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  12893. your QK script which pushes the buttons from the Script Editor and call
  12894. that from your more complete and functional script.
  12895.  
  12896. It's getting late.  ;)
  12897.  
  12898. Jon
  12899. =========================================================================
  12900. Date:         Fri, 29 Apr 1994 09:57:21 -0400
  12901. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12902. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12903. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  12904. Subject:      Re: MS: MIME Headers
  12905.  
  12906. >Eudora users who submit postings to MACSCRPT should send the command
  12907. >   SET FULLHRD ON
  12908.  
  12909. Well, I like Eudora, but not THAT much!!!  ;)
  12910.  
  12911. I believe Andy meant:
  12912.  
  12913. SET FULLHDR ON
  12914.         ^^^
  12915.  
  12916. Steve
  12917.  
  12918. ---------------------
  12919.  jonke@gsfc.nasa.gov
  12920. ---------------------
  12921. =========================================================================
  12922. Date:         Fri, 29 Apr 1994 06:59:55 -0700
  12923. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12924. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12925. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  12926. Subject:      Problem--AppleScript in HyperCard
  12927.  
  12928. Here's a cautionary tale.  In this case it doesn't matter, as is indicated
  12929. by the fact that the name of the stack is "JWB Play".
  12930.  
  12931. Given a HyperCard 2.2 script (in some object), written in the AppleScript
  12932. language.  In a handler, we find:
  12933.  
  12934.     tell application "UserLand Frontier "
  12935.         ....
  12936.     end tell
  12937.  
  12938.  
  12939. But, recently, I stopped running "UserLand Frontier ", in favor of
  12940. "UserLand Frontier  PowerPC".
  12941.  
  12942. Today, I tried to open that script (to find one I was looking for).  So
  12943. AppleScript's scripting component asked me 'Where is "UserLand Frontier "?
  12944. Since it wasn't around, I had to cancel.  At which point HyperCard
  12945. complained that it couldn't open the script.
  12946.  
  12947. So I can't edit the script to change Frontier's name.  [I'll either change
  12948. Frontier's name long enough to open the script, change Frontier's name
  12949. permanently, or play around setting the button's script property (which
  12950. will be the least efficient possible fix).
  12951.  
  12952. It's an interesting situation (and suggests that HyperCard is lax about
  12953. keeping script context information, or something...AppleScript Script
  12954. Editor isn't bothered by such a change...if it can't find the app by name
  12955. it looks for it by signature, and changes the text of the script
  12956. accordingly).
  12957.  
  12958.    --John
  12959.  
  12960. --
  12961. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  12962. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  12963. =========================================================================
  12964. Date:         Fri, 29 Apr 1994 09:05:57 -0500
  12965. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12966. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12967. From:         Fred Terry <pfterry@LKS.CSI.COM>
  12968. Subject:      Re: MS: MIME Headers
  12969. In-Reply-To:  Your message of "Fri, 29 Apr 94 09:57:21 EDT"
  12970.  
  12971. >>Eudora users who submit postings to MACSCRPT should send the command
  12972. >>   SET FULLHRD ON
  12973. >
  12974. >Well, I like Eudora, but not THAT much!!!  ;)
  12975. >
  12976. >I believe Andy meant:
  12977. >
  12978. >SET FULLHDR ON
  12979. >        ^^^
  12980.  
  12981. I got
  12982.  
  12983. SET MACSCRPT FULL
  12984.     ^^^^^^^^
  12985. to work a little better. :-)
  12986.  
  12987. pf
  12988. =========================================================================
  12989. Date:         Fri, 29 Apr 1994 11:43:17 -0500
  12990. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12991. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  12992. From:         Michael Leo <mleo@ENIAC.SEAS.UPENN.EDU>
  12993. Subject:      Re: Dialog Box
  12994.  
  12995. >>>Simple question follows.  Given a dialog box that comes up with some text
  12996. >>>highlighted and buttons to choose, cancel connect, how do I tell it to
  12997. >>>choose a specific button?  Thanks.
  12998. >
  12999. >>I think he's asking how to drive a nonscriptable dialog (probably one which
  13000. >>does SLIP or PPP ;).
  13001. >
  13002. >>Too bad I don't have an answer.  :(
  13003. >
  13004. >D'oh!
  13005. >
  13006. >As soon as I mailed that I realized that the answer I know of is QuicKeys
  13007. >3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  13008. >your QK script which pushes the buttons from the Script Editor and call
  13009. >that from your more complete and functional script.
  13010. >
  13011. >It's getting late.  ;)
  13012. >
  13013. >Jon
  13014.  
  13015.  
  13016. Thanks that is what I had intended in the way of the dialog box, but I
  13017. don't have Quick Keys yet, so I just used the Autotype addition to call a
  13018. return.
  13019.  
  13020.  LEO
  13021. =========================================================================
  13022. Date:         Fri, 29 Apr 1994 13:15:05 -0400
  13023. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13024. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13025. From:         Chris Brannon <cbrannon+@PITT.EDU>
  13026. Subject:      Cheapest way to get AS 1.1
  13027.  
  13028. I've seen several comments regarding upgrades to AS 1.1, so I figured I'd
  13029. repost this information, which I picked up from the list a while back.
  13030.  
  13031. You can order the 1.1 update to Danny Goodman's Complete AppleScript
  13032. Handbook for $4.75 (no shipping).  It includes AS 1.1, the latest script
  13033. editor, the Frontmost runtime extension and some help files.
  13034.  
  13035. As far as I can tell, it doesn't matter if you actually own the book (they
  13036. certainly didn't ask when I upgraded).
  13037.  
  13038. You can get in touch with Random House at 800-733-3000 (or 212-572-6045).
  13039. The ISBN number is 0-679-75537-3.
  13040.  
  13041.  
  13042.  
  13043. Regards,...Chris
  13044. +--------------------------------------------------------------------------
  13045. Christopher B. Brannon                             University of Pittsburgh
  13046. cbrannon+@pitt.edu        THE*TRUTH*IS*OUT*THERE          Political Science
  13047. =========================================================================
  13048. Date:         Fri, 29 Apr 1994 16:01:35 -0400
  13049. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13050. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13051. From:         "George R. Brown" <gbrown@PARTECH.COM>
  13052. Subject:      Applescript substring problem
  13053.  
  13054. I'm having a problem with the following script.  Look at the ***'d lines:
  13055.  
  13056. tell application "Eudora1.4.2"
  13057.         set theAddressee to ""
  13058.         set theAddressor to "george"
  13059.         set theSubject to "Attached documents..."
  13060.         tell application "Scriptable Text Editor"
  13061.                 set prefFile to open file =AC
  13062.                         "System Folder:Preferences:Send Attach Preferences"
  13063.                 repeat with i from 1 to count of lines of file prefFile
  13064.                         set str to (line i of file prefFile) as string
  13065.                         if str contains "From:" then
  13066.                                 set theAddressor to word 2 of str
  13067.                         else if str contains "Subject:" then
  13068.                                 --******************************************=
  13069. *
  13070.                                 --set x to (offset of ": " in str as string)=
  13071. +2
  13072.                                 --          ^^^^^^ returns compile error:
  13073.                                 --                 can't get ":" in str.
  13074.                                 --                 Access not allowed
  13075.                                 --******************************************=
  13076. *
  13077.                                 set theSubject to (characters (1) =AC
  13078.                                    thru (number of characters in str) of
  13079. str) as string
  13080.                         else if str contains "To:" then
  13081.                                 set theAddressee to word 2 of str
  13082.                         end if
  13083.                 end repeat
  13084.         end tell
  13085.         if theAddressee is empty then
  13086.                 set theResult to display dialog "Send to:" default answer =
  13087. =AC
  13088.                         "" buttons {"OK", "Cancel"} default button "OK"
  13089.                 set theButton to the button returned of theResult
  13090.                 set theAddressee to the text returned of theResult
  13091.         else
  13092.                 set theButton to "OK"
  13093.         end if
  13094.         if theButton is not "Cancel" then
  13095.                 set theMessage to make InsertHere end of mailbox "Out" of
  13096. mail folder "" ObjectClass message
  13097.                 set mbID to number of message of mailbox "Out" of mail=
  13098.  folder ""
  13099.                 tell theMessage
  13100.                         set toWhom to theAddressee
  13101.                         set field "Subject" to theSubject
  13102.                         set field "From" to theAddressor
  13103.                         set field "To" to theAddressee
  13104.                         --set field "X-Attachments" to docList
  13105.                         --set field "" to "Attachments: " & docList
  13106.                 end tell
  13107.                 queue theMessage QueueType 0
  13108.         end if
  13109. end tell
  13110.  
  13111.  - gb (george@partech.com)
  13112. =========================================================================
  13113. Date:         Fri, 29 Apr 1994 16:09:08 EDT
  13114. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13115. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13116. From:         "Andy J. Williams" <Andy.J.Williams@DARTMOUTH.EDU>
  13117. Subject:      MS: MIME II
  13118.  
  13119. Another note from the powers that be. Sorry for the confusion.
  13120.  
  13121. -A
  13122.  
  13123. -------
  13124.  
  13125. >Shouldn't the fix for MIME headers indicate the list?
  13126.  
  13127. Ooops.  Your right, the FULLHDR option is on a list-by-list basis, not
  13128. server wide, so the right syntax is indeed:
  13129.    SET MACSCRPT FULLHDR
  13130.  
  13131. Sorry.
  13132. =========================================================================
  13133. Date:         Fri, 29 Apr 1994 16:38:41 -0400
  13134. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13135. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13136. From:         Stephen Jonke <jonke@GSFC.NASA.GOV>
  13137. Subject:      App to run script at shutdown?
  13138.  
  13139. Does anyone know of an application that lets you create a "shutdown
  13140. script"?  A script that runs when you restart or shutdown your Mac?
  13141.  
  13142. Steve
  13143.  
  13144. ---------------------
  13145.  jonke@gsfc.nasa.gov
  13146. ---------------------
  13147. =========================================================================
  13148. Date:         Fri, 29 Apr 1994 16:41:31 -0400
  13149. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13150. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13151. From:         "George R. Brown" <gbrown@PARTECH.COM>
  13152. Subject:      Debugging applescripts
  13153.  
  13154. Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  13155. similarities between AppleScript and HyperCard but there certainly isn't
  13156. the debugger that HyperCard has (unless I'm missing something).  Can you
  13157. display the value of variables, set break-points, etc?
  13158.  
  13159.  - gb (george@partech.com)
  13160. =========================================================================
  13161. Date:         Fri, 29 Apr 1994 16:48:44 -0400
  13162. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13163. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13164. From:         Laurent Daudelin <laurent@PLANON.QC.CA>
  13165. Subject:      Applet & Droplet [REPOST]
  13166.  
  13167. Hi all!
  13168.  
  13169. Sorry to repost, I miss any answer because I was temporarely removed from the
  13170. list :-(
  13171.  
  13172. So, here it goes again:
  13173.  
  13174. I just begun to take a look at AppleScript and have a question.
  13175.  
  13176. I'm using AppleScript 1.0, found in the AV Macs.
  13177.  
  13178. I tried to use a script already posted here, to automatically do binhex
  13179. translation of a file, using Stuffit Lite.
  13180.  
  13181. The script check syntax is ok.  The problem is I don't have the choice to save
  13182. it as a drop-in application, in Script Editor.  I opened some drop-in applet,
  13183. and when I want to save them, the option for a droplet appears in the dialog,
  13184. but not when I want to save my script.  Is there anything I'm missing here?  I
  13185. suppose yes....
  13186.  
  13187. On a related topic, what do you get when you buy the AppleScript user-version
  13188. from APDA?  Any doc?  Is there any electronic documentation about the basics
  13189. of AppleScript?  I've search the latest bookmark CD, but found nothing.
  13190.  
  13191. Any help very appreciated!
  13192.  
  13193. Laurent.
  13194.  
  13195. ---
  13196. ******************************************************************
  13197. Laurent Daudelin, Software Engineer
  13198. Planon TELEXPERTISE Inc., Boucherville, Quebec, CANADA
  13199. laurent@planon.qc.ca <-- NeXTMail welcome! (Mac Mail welcome too!)
  13200. =========================================================================
  13201. Date:         Fri, 29 Apr 1994 15:57:08 -0500
  13202. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13203. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13204. From:         Fred Terry <pfterry@LKS.CSI.COM>
  13205. Subject:      Re: Debugging applescripts
  13206. In-Reply-To:  Your message of "Fri, 29 Apr 94 16:41:31 EDT"
  13207.  
  13208. George,
  13209.  
  13210. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  13211. >similarities between AppleScript and HyperCard but there certainly isn't
  13212. >the debugger that HyperCard has (unless I'm missing something).  Can you
  13213. >display the value of variables, set break-points, etc?
  13214.  
  13215. No, not within the Script Editor. However, you can display variables in dialog
  13216. boxes using the display dialog scripting addition and you can sprinkle beeps
  13217. through your scripts to get "audio traces." If you have access to the
  13218. AppleScript beta CD, there was a scripting addition on it called Show
  13219. Variables which would display a modal window with variables in it.
  13220.  
  13221. On the up side of things, Mark Alldritt is working on a Script Debugger that
  13222. looks pretty good, and Main Event Software is also preparing a
  13223. beginner/developer environment called Scripter. Both programs will make
  13224. scripting easier.
  13225.  
  13226. pf
  13227.  
  13228.  
  13229. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  13230. Fred Terry, The Alta Group, pfterry@lks.csi.com, +1 913/841-1283
  13231. =========================================================================
  13232. Date:         Fri, 29 Apr 1994 16:54:00 -0400
  13233. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13234. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13235. Comments:     Warning -- original Sender: tag was ross@BNR.CA
  13236. From:         ab026@FREENET.CARLETON.CA
  13237. Subject:      Re: Menu Events
  13238.  
  13239. Matthew Ahrens writes:
  13240.  
  13241. >I'm not sure if this is what you were talking about, but I wrote a
  13242. >script to be able to easier use Menu Events. Normally, you are supposed
  13243. >to use ResEdit to paste the aete into the app you wish to control. i
  13244. >don't know about you, but to me this is a pain in the butt.
  13245.  
  13246. Yeah, it *was* a pain until I added a proper scripting addition file in
  13247. version 1.1.1.  Version 1.1.2 is now current; you can get it from
  13248.   ftp://gaea.kgs.ukans.edu/applescript/addons/Menu_Events_1.1.2.sit.Hqx
  13249.  
  13250. The package includes a sample script.  No more ResEdit.
  13251.  
  13252. Ross Brown - AWOL Software Productions
  13253. PO Box 24207, 300 Eagleson Road, Kanata, Ontario, Canada K2M 2C3
  13254. publisher of AWOL Utilities - "the best deal in freeware!"
  13255. ab026@freenet.carleton.ca
  13256. =========================================================================
  13257. Date:         Fri, 29 Apr 1994 13:58:12 -0800
  13258. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13259. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13260. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  13261. Subject:      Re: Debugging applescripts
  13262.  
  13263. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  13264. >similarities between AppleScript and HyperCard but there certainly isn't
  13265. >the debugger that HyperCard has (unless I'm missing something).  Can you
  13266. >display the value of variables, set break-points, etc?
  13267. >
  13268. > - gb (george@partech.com)
  13269.  
  13270. I agree, the debugging tools for AppleScript are just not there yet.
  13271.  
  13272. I use statements such as:
  13273.  
  13274. display dialog "marker #1"
  13275.  
  13276. to step through the code to see which statement is failing.
  13277.  
  13278. I have found that the Apple Script Editor gives much better error messages
  13279. than does FaceSpawn or FrontMost or whatever they call it. I am developing
  13280. in FaceSpawn so that I have some user interface.
  13281.  
  13282. The most difficult part I have is in figuring out how the data in a
  13283. variable looks so that I can parse it and do something with it to give it
  13284. to the next statement.
  13285.  
  13286. Good luck, remember, HyperCard initially didn't have debuggers and variable
  13287. watchers either.
  13288.  
  13289. Kee nethery
  13290. =========================================================================
  13291. Date:         Fri, 29 Apr 1994 16:46:45 -0400
  13292. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13293. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13294. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  13295. Subject:      Can a script-applet run in background?
  13296.  
  13297. I have written a short script that mounts an AFPServer, copies
  13298. the contents of the mounted folder/volume to another disk, then
  13299. deletes the copied files.  The copy and delete are done using
  13300. the appropriate osaxen from Jon's commands.
  13301.  
  13302. My problem:  I'd like this to happen in the background for the
  13303. machine running the script, but I can't bring another app
  13304. (already open) to the foreground once I start the script.
  13305. If I change the script so as to activate the Finder some
  13306. time during execution, I can switch apps, but then the script
  13307. sits in the background apparently doing nothing until it dies
  13308. with an "Apple event timed out" error message.  Is this normal,
  13309. or have I messed up somewhere?  It's 7.0.1* on a IIx running
  13310. AS 1.1.
  13311.  
  13312. Here's the script, in case anyone is interested in the
  13313. server-related stuff:
  13314.  
  13315. try
  13316.   list nodes
  13317.   if (the result contains "wdjUs Macintosh:AFPServer@*") is false then
  13318.     display dialog "Please turn on FileSharing on wdj's Mac!" buttons
  13319.     {"OK"} default button "OK" with icon stop
  13320.   else
  13321.     list disks
  13322.     if (the result contains "Downloads") is false then
  13323.       MountVolume Zone "*" Server "wdjUs Macintosh" Volume "Downloads"
  13324.     end if
  13325.     set inputFolderPath to "Downloads:"
  13326.     set fileList to list folder inputFolderPath
  13327.     set destFolder to "HD0:Downloads:"
  13328.     set destFolderContents to list folder destFolder
  13329.     set skippedFiles to "" as string
  13330.     repeat with index from 1 to the number of items in fileList
  13331.       set theFile to item index of fileList
  13332.       if destFolderContents contains theFile then
  13333.         -- skip it, and warn user
  13334.         beep
  13335.         set skippedFiles to (skippedFiles & theFile & return)
  13336.       else
  13337.         set inputFilePath to inputFolderPath & theFile
  13338.         copyFile inputFilePath to destFolder without replacing
  13339.         deleteFile inputFilePath
  13340.       end if
  13341.     end repeat
  13342.     if skippedFiles is not "" then
  13343.       display dialog ("Won't clobber " & return & skippedFiles) buttons
  13344.       {"OK"} default button "OK"
  13345.     end if
  13346.   end if
  13347. on error errorText
  13348.   beep
  13349.   display dialog errorText buttons {"OK"} default button "OK" with icon stop
  13350. end try
  13351.  
  13352. -- Bill Johnston (johnston@me.udel.edu)
  13353. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  13354. =========================================================================
  13355. Date:         Fri, 29 Apr 1994 17:11:18 -0400
  13356. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13357. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13358. From:         Bill Johnston <johnston@ME.UDEL.EDU>
  13359. Subject:      Re: App to run script at shutdown?
  13360. In-Reply-To:  <9404292043.AA15583@me.udel.edu>
  13361.  
  13362. Not an app, but how about the Shutdown FX init?
  13363.  
  13364. Bill
  13365.  
  13366. -- Bill Johnston (johnston@me.udel.edu)
  13367. -- 38 Chambers Street; Newark, DE 19711; (302)368-1949
  13368. =========================================================================
  13369. Date:         Fri, 29 Apr 1994 16:13:00 -0500
  13370. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13371. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13372. From:         Fred Terry <pfterry@LKS.CSI.COM>
  13373. Subject:      Re: Applet & Droplet [REPOST]
  13374. In-Reply-To:  Your message of "Fri, 29 Apr 94 16:48:44 EDT"
  13375.  
  13376. Everyone,
  13377.  
  13378. >Sorry to repost, I miss any answer because I was temporarely removed from the
  13379. >list :-(
  13380. >
  13381.  
  13382. [Sorry, Laurent, I'm not near my Mac and can't remember the response.]
  13383.  
  13384. However, if you are ever dropped from the list, you can always find the
  13385. digests on
  13386.  
  13387. ftp://gaea.kgs.ukans.edu/applescript/docs/digests/
  13388.  
  13389. >On a related topic, what do you get when you buy the AppleScript user-version
  13390. >from APDA?  Any doc?  Is there any electronic documentation about the basics
  13391. >of AppleScript?  I've search the latest bookmark CD, but found nothing.
  13392.  
  13393. You get the AppleScript Language Guide, the Getting Started Guide, and the
  13394. Scripting Additions Guide. You'll find the HyperCard stack Language at a
  13395. Glance in
  13396.  
  13397. ftp://gaea.kgs.ukans.edu/applescript/docs/Language_at_a_Glance.sit.hqx
  13398.  
  13399. pf
  13400. =========================================================================
  13401. Date:         Fri, 29 Apr 1994 14:28:54 -0700
  13402. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13403. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13404. From:         David Ray <daver@NETCOM.COM>
  13405. Subject:      Re: Dialog Box
  13406.  
  13407. >>>Simple question follows.  Given a dialog box that comes up with some text
  13408. >>>highlighted and buttons to choose, cancel connect, how do I tell it to
  13409. >>>choose a specific button?  Thanks.
  13410. >
  13411. >As soon as I mailed that I realized that the answer I know of is QuicKeys
  13412. >3.0 which can be called from AppleScript.  It's fairly easy too.  Record
  13413. >your QK script which pushes the buttons from the Script Editor and call
  13414. >that from your more complete and functional script.
  13415. >
  13416. >It's getting late.  ;)
  13417. >
  13418. >Jon
  13419.  
  13420. Another less expensive option is the AutoType osax (shareware). You can always
  13421. use it to click on the highlighted button (with 'enter' or 'control-m'), and
  13422. in some cases control other buttons (when they have command-key equivalents).
  13423. I managed to write a scipt to control Fetch to enter passwords and 'put'
  13424. files using these techniques.
  13425.  
  13426. -Dave
  13427. daver@netcom.com
  13428. =========================================================================
  13429. Date:         Fri, 29 Apr 1994 14:36:00 -0700
  13430. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13431. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13432. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  13433. Subject:      Re: Debugging applescripts
  13434.  
  13435. >Being a new AppleScripter, how do you debug scripts?  "They" talk about the
  13436. >similarities between AppleScript and HyperCard but there certainly isn't
  13437. >the debugger that HyperCard has (unless I'm missing something).  Can you
  13438. >display the value of variables, set break-points, etc?
  13439.  
  13440. You can (1) look at what the target application does about what you tell it
  13441. to do;
  13442.    (2) display dialogs at key points (if the key values you care about can
  13443. be made into strings)
  13444.  
  13445.    (3) see the result of the last operation executed in the result window
  13446. (it does a little better about what it can manage to show you)
  13447.  
  13448. [Or you can switch to Frontier, whose debugging support lets you single
  13449. step, look at variables, change variables and do other interesting
  13450. debugging stuff.  But only for UserTalk scripts, not for AppleScript ones
  13451. you happen to write in the Frontier editor.]
  13452.  
  13453.    --John
  13454.  
  13455. --
  13456. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  13457. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  13458. =========================================================================
  13459. Date:         Fri, 29 Apr 1994 14:42:23 -0700
  13460. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13461. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13462. From:         Edmund Lai <lai@APPLE.COM>
  13463. Subject:      Re: AS Interpreter
  13464.  
  13465. >Or you can just type stuff into a field in HyperCard and execute it at the
  13466. >press of return or enter or whatever you choose.
  13467. >
  13468. >My Messenger application has that AS feature. Messenger is for one-to-one
  13469. >chatting over AppleTalk LANs, but you can also type AppleScript commands
  13470. >and select "Do AppleScript Commands" from the AS menu.
  13471. >
  13472. >Messenger was written in HyperCard 2.1 and 2.2, is a stand-alone
  13473. >application, and is available at sumex-aim, umich and all their mirrors.
  13474. >
  13475. >-DM
  13476. >
  13477. >
  13478.  
  13479. It really takes very little effort to write a message box that you can
  13480. type in AppleScript commands and execute it. All it takes is a few OSA
  13481. calls. It was planned that way so that one can easily write and execute
  13482. a script from anywhere.
  13483.  
  13484. The fact it can be easily done does not mean that it will be done.
  13485. Right now you can only do it from applications that can be considered
  13486. to be scripting utilities. So it would be nice if there is a way to do
  13487. a universial message box without making any changes to the applications.
  13488.  
  13489. Actually there are Mac toolbox manager that were never meant to be used
  13490. for scripting that can be helpful. That is the Text Service Manager (TSM)
  13491. which is used for input method of Chinese and Japanese system. The two
  13492. seem completely unrelated, so it is not a perfect fit to use the TSM for
  13493. AppleScript message box, and it is difficult to convince people that TSM
  13494. should be modified so that it can serve the purpose of being used as an
  13495. AppleScript message box. For one thing this means that it would only work
  13496. under the the Chinese or Japanese OS. This is not a problem for me since
  13497. I do have the Chinese OS installed for my own machine, but very few others
  13498. have.
  13499.  
  13500. Why is the TSM useful for a message box? TSM provides floating window
  13501. which is above every application layer which is ideal for message box.
  13502. It can be invoked from about any application doing text input and allows
  13503. the choice of a font, and that covers lots of applications. TSM provides
  13504. a system wide menu on the right hand side of the menu bar and that is
  13505. ideal for a script menu. TSM listens to low level events such as
  13506. keystrokes and reports them to the "input methods" so it has the
  13507. potential to be used for low level recording. It is unfortunate that
  13508. it is not being taken advantage of.
  13509.  
  13510. Anyway I have experiment with using TSM as an message box. I have
  13511. been working on a Chinese input method on my spare time and it is
  13512. only a slight diversion to also use it as a message box. It is not
  13513. perfect. Since normally it is a Chinese input method, it would
  13514. treat you AppleScript statement as input for Chinese and try to
  13515. turn it into Chinese, sometimes with very funny result. At the
  13516. end you need to execute from the menu to tell the input method
  13517. that what you typed in is not Chinese input but it is AppleScript
  13518. statement. Also since I connect and disconnect from AppleScript
  13519. for each execution, it potentially load and unload AppleScript
  13520. every time so it is very slow unless you force AppleScript to
  13521. stay loaded by having Script Editor running. It is really an
  13522. experiment rather than the real thing but the bottom line is
  13523. that it works.
  13524.  
  13525. Note that this is different from having a "message box" in HyperCard
  13526. and talking to another application. The message box is right inside
  13527. the application and talking to the application directly, so there
  13528. is no need to have "tell application x". I have only tried it
  13529. on the Scriptable Text Editor, from this message box you can type
  13530. and execute statement like
  13531.  
  13532. select word 4 of window 1
  13533.  
  13534. or
  13535.  
  13536. delete word 1 through 5 of window 1
  13537.  
  13538. or
  13539.  
  13540. current date as string
  13541.  
  13542. The last command returns a result and it will be put back into the
  13543. current selection of the document.
  13544.  
  13545. In this way potential every application can have a message box like
  13546. HyperCard that you can use to talk to the application.
  13547.  
  13548. It would be interesting to do it to the scriptable finder, however
  13549. Chinese input is disabled in the Finder. I think I may need to do
  13550. it to a Chinese version of the Finder.
  13551.  
  13552. What we have been doing with scripting just touches the surface,
  13553. the potential is unlimited.
  13554.  
  13555. /* Disclaimer: All statments and opinions expressed are my own */
  13556. /* Edmund K. Lai                                               */
  13557. /* Apple Computer, MS303-3A                                    */
  13558. /* 20525 Mariani Ave,                                          */
  13559. /* Cupertino, CA 95014                                         */
  13560. /* (408)974-6272                                               */
  13561. zW@h9cOi
  13562.  
  13563. /* Disclaimer: All statments and opinions expressed are my own */
  13564. /* Edmund K. Lai                                               */
  13565. /* Apple Computer, MS303-3A                                    */
  13566. /* 20525 Mariani Ave,                                          */
  13567. /* Cupertino, CA 95014                                         */
  13568. /* (408)974-6272                                               */
  13569. zW@h9cOi
  13570. =========================================================================
  13571. Date:         Fri, 29 Apr 1994 16:42:06 -0700
  13572. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13573. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13574. From:         Steve Michel <michel@NETCOM.COM>
  13575. Subject:      Re: Applescript substring problem
  13576.  
  13577. George,
  13578.  
  13579. Your problem is coming because Offset is a property used by Scriptable Text
  13580. Editor. So, when you want to use the Offset Scripting Addition inside a
  13581. tell block for the Scriptable Text Editor, you have to use "my" to make
  13582. sure the OSAX is used, and not the STE property. Change the offending line
  13583. to read:
  13584.  
  13585. set x to (my offset of ": " in str)
  13586.  
  13587. and it compiles fine (or did for me).
  13588.  
  13589. Steve
  13590. =========================================================================
  13591. Date:         Fri, 29 Apr 1994 21:05:47 -0400
  13592. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13593. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13594. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  13595. Subject:      Eudora event to Frontmost?
  13596.  
  13597. I was trying to have Eudora notify a Frontmost application.  I started by
  13598. using a code fragment that worked fine from the Script Editor.  Namely,
  13599. after telling Eudora which application it should notify, I had a handler
  13600. that looked something like:
  13601.  
  13602. on <<event CSOmeNot>> msgList
  13603.         copy (count of items in msgList) to newMsgs
  13604.         beep newMsgs
  13605. end <<event CSOmeNot>>
  13606.  
  13607. However, in my Frontmost application it seems as if it never gets the
  13608. event.  Is there any reason why the application shouldn't get the event?  I
  13609. wasn't getting any errors, either.  Is the problem the aete resource in the
  13610. Frontmost app (which doesn't exist in the apple script app?  Thanks,
  13611.  
  13612.                                 -Steve.
  13613.  
  13614.  
  13615. +--------------------------------------------------------------+
  13616. | Steven L. Rohall                                             |
  13617. |                            ________ _        ______  ______  |
  13618. | 55 Walkers Brook Drive        /    / \      /     / /     /  |
  13619. | Reading, MA 01867-3297       /    /___\    /______ /         |
  13620. | Tel: (617)942-2000          /    /     \         //          |
  13621. | Fax: (617)942-7100         /    /       \/______//______/    |
  13622. | slrohall@tasc.com                                            |
  13623. | (MIME-conformant mail welcome.)                              |
  13624. +--------------------------------------------------------------+
  13625. =========================================================================
  13626. Date:         Fri, 29 Apr 1994 21:21:40 -0400
  13627. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13628. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13629. From:         "Steven L. Rohall" <slrohall@TASC.COM>
  13630. Subject:      Re: Eudora event to Frontmost?
  13631.  
  13632. Earlier I said:
  13633. >I was trying to have Eudora notify a Frontmost application.  I started by
  13634. >using a code fragment that worked fine from the Script Editor.  Namely,
  13635. >after telling Eudora which application it should notify, I had a handler
  13636. >that looked something like:
  13637. >
  13638. >on <<event CSOmeNot>> msgList
  13639. >        copy (count of items in msgList) to newMsgs
  13640. >        beep newMsgs
  13641. >end <<event CSOmeNot>>
  13642. >
  13643. ...
  13644.  
  13645. I should note that if my Frontmost app is not running when Eudora tries to
  13646. send the event, my app will be launched--so it looks like the event is
  13647. getting there.  But, my handler doesn't seem to be getting called.  Is the
  13648. event being caught somewhere else?
  13649.  
  13650.                                 -Steve.
  13651. =========================================================================
  13652. Date:         Fri, 29 Apr 1994 19:43:46 -0700
  13653. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13654. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13655. From:         "John W. Baxter" <jwbaxter@OLYMPUS.NET>
  13656. Subject:      Re: App to run script at shutdown?
  13657.  
  13658. >Does anyone know of an application that lets you create a "shutdown
  13659. >script"?  A script that runs when you restart or shutdown your Mac?
  13660.  
  13661. One of the almost hidden extras on the AppleScript 1.1 Developer Kit is an
  13662. extension which enables a Shutdown Items folder (a sibling of the Startup
  13663. Items folder).  The brief note in the readme suggests that it operates at
  13664. shutdown time the way Startup Items does at startup time.  [Before, one
  13665. hopes, Finder concludes that it has managed to shut everyone down.]
  13666.  
  13667. Said to work with System 7.1 and later.  Likely part of the base release in 
  13668. 7.5.
  13669.  
  13670.    --John (who wonders how many CDs it will take to hold System 7.5...)
  13671.  
  13672. --
  13673. jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
  13674. finger me to prove I'm all wet (Port Ludlow rainfall numbers).
  13675. =========================================================================
  13676. Date:         Fri, 29 Apr 1994 21:57:43 -0500
  13677. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13678. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13679. From:         Kelly A Campbell <camel@CIS.KSU.EDU>
  13680. Subject:      jon's commands question
  13681. In-Reply-To:  <199404300151.UAA21950@depot.cis.ksu.edu> from "George R. Brown"
  13682.               at Apr 29, 94 04:41:31 pm
  13683.  
  13684.   I saw something about Jon's cammands on here, and I was wondering
  13685. what that was exactly. I checked at gaea, but didn't find anything there.
  13686.  
  13687. Thanks,
  13688. Kelly
  13689. --
  13690. ,---------------------------------------------------------.
  13691. | Kelly A. Campbell      |       Kansas State University  |
  13692. | camk@ksu.ksu.edu       |       Student Publications     |
  13693. | camel@cis.ksu.edu      |       Macintosh Tech Support   |
  13694. `---------------------------------------------------------'
  13695. =========================================================================
  13696. Date:         Fri, 29 Apr 1994 20:02:36 -0700
  13697. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13698. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13699. From:         Jon Pugh <jonpugh@NETCOM.COM>
  13700. Subject:      Re: Stuff
  13701.  
  13702. >My next thing to look for is a way to access dictionaries from a
  13703. >script.
  13704.  
  13705. I have a set of half+ completed osaxen that will do this.  They support the
  13706. Get Event Info, Get Class Info, Get Suite Info, & Get Enumeration Info
  13707. events.  They work by parsing the aete and returning records with the
  13708. corresponding info.  I haven't had a chance to work on it for a while and
  13709. was wondering if people really wanted this functionality.  It was
  13710. originally intended to be part of AppleScript, but it was deemed marginally
  13711. useful (No one's going to want to get a dictionary from a script) and thus
  13712. dropped.  My plan is to complete them, but it's fairly low on my list.
  13713.  
  13714. >I'm aware that some of what I'd like to do might be doable
  13715. >using the scriptable text parsing of a MacPerl, but launching
  13716. >that is overkill for the current project, in which I'd like
  13717. >to parse the result of "current date" to build a string like
  13718. >"940427" to append to the name of a backup file.
  13719.  
  13720. This is on my list too, but higher up.  I'm planning a formatted date osax
  13721. which will allow you to specify a string and get a date in that format.
  13722.  
  13723. Jon
  13724. =========================================================================
  13725. Date:         Fri, 29 Apr 1994 22:23:12 -0500
  13726. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13727. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13728. From:         Jonathan Bauer <jhbauer@PANIX.COM>
  13729. Subject:      Re: Mail document to person as Eudora Attachment
  13730.  
  13731. >The attached file is an applet that takes any file droped onto it and mails
  13732. >it off to the person specified in the file.  I would change it to a bogus
  13733. >email address as the default, except something seems to have happened to my
  13734.  
  13735. Of course I don't really know what I'm doing, so take with a grain (or ton)
  13736. of salt, but when I double click your attachment I get the following error:
  13737.  
  13738.         Could not run the script "Mail to Peter" because the
  13739.         script's data format  is too new for the scripting format
  13740.         to read it.
  13741.         -1759
  13742.  
  13743. What does this mean??
  13744.  
  13745. thanks,
  13746.  
  13747. /jonathan
  13748.  
  13749. ----------------------------------
  13750. Jonathan Bauer <jhbauer@panix.com>
  13751. 440 W. 41st St. #202
  13752. N.Y. N.Y.  10036
  13753. +1 212-239-5158
  13754. =========================================================================
  13755. Date:         Sat, 30 Apr 1994 15:39:39 +0800
  13756. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13757. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13758. From:         Craig Richmond <craig@DECEL.ECEL.UWA.EDU.AU>
  13759. Subject:      Re: Mail document to person as Eudora Attachment
  13760.  
  13761. >        Could not run the script "Mail to Peter" because the
  13762. >        script's data format  is too new for the scripting format
  13763. >        to read it.
  13764. >        -1759
  13765. >
  13766. >What does this mean??
  13767.  
  13768. I think it is apple's way of telling you that someone else has received a
  13769. bundled copy or spent the dollars for Applescript 1.1 and now it is your
  13770. turn to do the same :-(
  13771.  
  13772. There was a message that went through with an improved salt-free version of
  13773. the script.  I suspect that just copying that text would be a better way of
  13774. doing it.
  13775.  
  13776. What is the concensus people?  Was my posting the applet a mistake?  Should
  13777. I in the future cut and paste the script?  Is this is the FAQ which I
  13778. probably haven't read?  Can anyone see a good reason to post the applet?
  13779.  
  13780. Craig
  13781.  
  13782. --
  13783. Craig Richmond, Computer Officer, ECEL Computing Services  +61 9 380 1405
  13784. The University of Western Australia      or 380 3860 Email for FAX Number
  13785. craig@ecel.uwa.edu.au Dvorak Keyboards RULE!  "Messes are only acceptable
  13786. if users make them.  Applications aren't allowed this freedom" I.M.VI 2-4
  13787. =========================================================================
  13788. Date:         Sat, 30 Apr 1994 11:08:54 -0500
  13789. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13790. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13791. From:         Michael Kilgore <mak@TICIPA.WORKS.TI.COM>
  13792. Organization: Texas Instruments, Inc.
  13793. Subject:      Re: Mail document to person as Eudora Attachment
  13794.  
  13795. >[...]  Was my posting the applet a mistake?  Should
  13796. >I in the future cut and paste the script?
  13797.  
  13798. Well, I guess there are times when the script is not enough, such as when
  13799. the applet has resources; so in principle people should send whatever is
  13800. needed to illustrate the problem.
  13801.  
  13802. But my preference would be for a wrapper, such as a .sit file, around the
  13803. real material.  It was a little startling to have SAM suddenly announce to
  13804. me that something wanted to create an app; having a wrapped file would
  13805. allow me to defer that decision.  (But my reaction may be because I haven't
  13806. adapted yet to what MIME can do for me, or because I'm not configuring
  13807. Eudora to best advantage; so feel free to discount the suggestion.)
  13808.  
  13809. --
  13810. Michael Kilgore     (214)917-2219
  13811. =========================================================================
  13812. Date:         Sat, 30 Apr 1994 13:10:37 -0400
  13813. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13814. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13815. From:         "Brian V. Hughes" <hades@COOS.DARTMOUTH.EDU>
  13816. Subject:      Re: Exporting Records
  13817. In-Reply-To:  <no.id> from "Roy Rapoport" at Apr 28, 94 06:02:04 pm
  13818.  
  13819. --Roy Rapoport wrote:
  13820. >
  13821. >Exporting Records
  13822. >Anyone know of a way for AppleScript to tell FileMaker Pro to export found
  13823. >records into a file?
  13824.  
  13825.     Not directly. There is no export AS command for FM Pro. What you can
  13826. do is have a FM script that exports data and then call that script with
  13827. a do script command, but this isn't very flexable.
  13828.  
  13829. -Hades
  13830. =========================================================================
  13831. Date:         Sat, 30 Apr 1994 10:21:38 -0700
  13832. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13833. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13834. From:         Mike Cohen <isis@NETCOM.COM>
  13835. Subject:      Re: Mail document to person as Eudora Attachment
  13836. In-Reply-To:  <199404301717.KAA29776@mail.netcom.com> from "Michael Kilgore" at
  13837.               Apr 30, 94 11:08:54 am
  13838.  
  13839. >
  13840. > >[...]  Was my posting the applet a mistake?  Should
  13841. > >I in the future cut and paste the script?
  13842. >
  13843. > Well, I guess there are times when the script is not enough, such as when
  13844. > the applet has resources; so in principle people should send whatever is
  13845. > needed to illustrate the problem.
  13846. >
  13847. > But my preference would be for a wrapper, such as a .sit file, around the
  13848. > real material.  It was a little startling to have SAM suddenly announce to
  13849. > me that something wanted to create an app; having a wrapped file would
  13850. > allow me to defer that decision.  (But my reaction may be because I haven't
  13851. > adapted yet to what MIME can do for me, or because I'm not configuring
  13852. > Eudora to best advantage; so feel free to discount the suggestion.)
  13853. >
  13854. > --
  13855. > Michael Kilgore     (214)917-2219
  13856. >
  13857. I was a little surprised when I double-clicked it assuming it was a .SEA file
  13858. (I don't have my downloads window view by icons). BTW, I've improved it
  13859. slightly to allow a recipient and short message to be entered.
  13860.  
  13861. --
  13862. Mike Cohen           | "Software that means business"
  13863. ISIS International   |
  13864. (818) 788-4747 Voice | isis@netcom.com           | ALink: D6734
  13865. (818) 501-0653 Fax   | NewtonMail, eWorld: MikeC | AOL: MikeC20
  13866. =========================================================================
  13867. Date:         Sat, 30 Apr 1994 10:24:34 -0800
  13868. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13869. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13870. From:         Kee Nethery +1 510 843 6140 <kee@KAGI.COM>
  13871. Subject:      Re: Mail document to person as Eudora Attachment
  13872.  
  13873. >What is the concensus people?  Was my posting the applet a mistake?  Should
  13874. >I in the future cut and paste the script?  Is this is the FAQ which I
  13875. >probably haven't read?  Can anyone see a good reason to post the applet?
  13876.  
  13877. I concur with the idea of putting it in a wrapper such as stuffit. I too
  13878. was a bit surprised to see an applet appear on my hard drive.
  13879.  
  13880. Kee Nethery
  13881.  
  13882. _________________________________________________________________
  13883. Kagi Engineering, 1442-A Walnut #362, Berkeley, CA 94709-1405 USA
  13884. =========================================================================
  13885. Date:         Sat, 30 Apr 1994 11:12:53 -0800
  13886. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13887. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13888. From:         Ed Lai <lai@APPLE.COM>
  13889. Subject:      Scriptable  fractal program
  13890.  
  13891. This is from comp.sys.mac.apps, it sounds interesting to this group. Can
  13892. someone who has access to AOL or CompuServe download it and make it
  13893. available for ftp?
  13894.  
  13895. ******************************************
  13896.  
  13897. Listed below is the release information for Color Fractal Generator 2.1.  This
  13898. is a fractal program which provides extensive support for Frontier and
  13899. AppleScript, permitting users to automate searches and even create fractal
  13900. movies through scripting (it also creates beautiful fractal images).  This
  13901. program is available on America Online, CompuServe, and Ziff-Net Mac.  I do not
  13902. have access to ftp to upload this to Internet.  The program is Shareware
  13903. (registration fee $15).  You may obtain the THINK C source code for $40.  The
  13904. registration fees may be sent to:
  13905.  
  13906. John A. Schlack
  13907. 824 Rhoads Avenue
  13908. Jenkintown, Pa. 19046.
  13909.  
  13910. Send me E-mail if you have additional questions or comments (John40@aol.com).
  13911.  
  13912. ----------------------------------------------------------------
  13913.  
  13914. Color Fractal Generator 2.1 is a major upgrade of the previously released
  13915. versions.  Scripting support has been added including an extensive set of
  13916. verbs, shared menus, and a quick script utility.  In addition to native CFG
  13917. palettes, this program can load palettes from resources of type 'clut' and
  13918. 'pltt'.  One may select the floating point display precision, anywhere from 3
  13919. to 18 digits.  Additional standard window sizes have been added to the Size
  13920. menu.  The coloring method for 4 and 8 bit systems has been dramatically
  13921. improved.
  13922.  
  13923. Other significant features include: support for 4, 8, 16, and 32-bit color,
  13924. full background processing, building multiple fractals simultaneously,
  13925. palettes, saving a fractal during generation and then restarting where left off
  13926. (registered users), both a help dialog providing extensive online support and
  13927. balloon help for quick reminders, System 7.0 features, and support for
  13928. computers with and without math coprocessors.
  13929.  
  13930. This program generates beautiful color Mandelbrot, Julia, Dragon, and Random
  13931. Walk fractals and provides near unlimited maneuvering through the fractal
  13932. world.  The program requires a Mac with Color QuickDraw, 16+ color monitor, and
  13933. System 6.05 or later (including System 7.0).  System 6.0x requires MultiFinder.
  13934.  The program can run in 32-bit addressing mode.
  13935.  
  13936. Scripting is now the most prominent feature of CFG.  This program has the
  13937. appropriate code to handle both AppleScript and UserLand Frontier.  Using the
  13938. scripting capabilities is definitely not required to generate great fractals
  13939. using CFG, but it does provide the user with the ability to extend the power of
  13940. this program.  One can write scripts to provide simple utilities that make CFG
  13941. easier to use (such as the Stack Windows sample script), automate the
  13942. exploration of the fractal universe, or even create fractal movies.
  13943.  
  13944. You also have an opportunity to obtain the FULL SOURCE CODE in THINK C 6.0
  13945. format.  Download the product for more information.
  13946.  
  13947. This version of the program cannot save fractal graphics.  Saving the images is
  13948. a feature added when the user registers.  Please note that the fractal's
  13949. parameters may be saved permitting recreation of the fractal at any time.
  13950.  
  13951. ******************************************
  13952.  
  13953. /* Disclaimer: All statments and opinions expressed are my own */
  13954. /* Edmund K. Lai                                               */
  13955. /* Apple Computer, MS303-3A                                    */
  13956. /* 20525 Mariani Ave,                                          */
  13957. /* Cupertino, CA 95014                                         */
  13958. /* (408)974-6272                                               */
  13959. zW@h9cOi
  13960. =========================================================================
  13961. Date:         Sat, 30 Apr 1994 18:20:07 -0400
  13962. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13963. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13964. From:         Bob Snyder <snyderra@DUNX1.OCS.DREXEL.EDU>
  13965. Subject:      Writing OSAXen
  13966.  
  13967. Are there any docs on how to write an OSAX, other than the docs presumably
  13968. sold by Apple?
  13969.  
  13970. Bob
  13971.  
  13972. --
  13973. Bob Snyder N2KGO                                     MIME, RIPEM mail accepted
  13974. snyderra@dunx1.ocs.drexel.edu                       finger for RIPEM public key
  13975.          When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
  13976. =========================================================================
  13977. Date:         Sat, 30 Apr 1994 17:24:42 -0500
  13978. Reply-To:     Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13979. Sender:       Macintosh Scripting Systems <MACSCRPT@DARTCMS1.BITNET>
  13980. From:         Fred Terry <pfterry@LKS.CSI.COM>
  13981. Subject:      Re: Scriptable fractal program
  13982. In-Reply-To:  Your message of "Sat, 30 Apr 94 11:12:53 -0900"
  13983.  
  13984. Ed Lai writes .....
  13985.  
  13986. >This is from comp.sys.mac.apps, it sounds interesting to this group. Can
  13987. >someone who has access to AOL or CompuServe download it and make it
  13988. >available for ftp?
  13989. >
  13990. >******************************************
  13991. >
  13992. >Listed below is the release information for Color Fractal Generator 2.1.  This
  13993. >is a fractal program which provides extensive support for Frontier and
  13994. >AppleScript, permitting users to automate searches and even create fractal
  13995. >movies through scripting (it also creates beautiful fractal images).  This
  13996. >program is available on America Online, CompuServe, and Ziff-Net Mac.  I do no
  13997. >t
  13998. >have access to ftp to upload this to Internet.  The program is Shareware
  13999. >(registration fee $15).  You may obtain the THINK C source code for $40.  The
  14000.  
  14001. You'll find it on gaea.kgs.ukans.edu in
  14002.  
  14003. ftp://gaea.kgs.ukans.edu/applescript/scriptableapps/CFG2.1UR.sit.hqx
  14004.  
  14005. Enjoy.
  14006.  
  14007. pf
  14008.  
  14009.  
  14010.  
  14011.  
  14012.